mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
![]() Previously certain lines of code would break the indentation process. For example, the following code would result in incorrect indentation: def hello; end puts "Hello world" This would result in the following: def hello; end puts "Hello world" I've worked around this issue by adding a new method (Pry::Indent#skip_indentation?) that does a lookahead on the list of tokens to determine if a line should be indented or not. It's probably not the most efficient way of doing it but it makes it quite easy to add more tokens to the list without adding a lot more complexity. Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com> |
||
---|---|---|
.. | ||
test_default_commands | ||
helper.rb | ||
test_command_helpers.rb | ||
test_command_processor.rb | ||
test_command_set.rb | ||
test_completion.rb | ||
test_default_commands.rb | ||
test_exception_whitelist.rb | ||
test_history_array.rb | ||
test_indent.rb | ||
test_input_stack.rb | ||
test_method.rb | ||
test_pry.rb | ||
test_pry_history.rb | ||
test_pry_output.rb | ||
test_special_locals.rb | ||
testrc |