diff options
author | schneems <richard.schneeman+foo@gmail.com> | 2023-03-08 18:30:33 -0600 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-04-06 15:45:29 +0900 |
commit | 2acbcec056f54df9b4d98d4d15b1e9f612ac1432 (patch) | |
tree | a68919e7725c1ca706c5a62c4e63e2354acd041f /lib/syntax_suggest/parse_blocks_from_indent_line.rb | |
parent | 5487ee4fe8b1311d42367969860468e48667cc87 (diff) | |
download | ruby-2acbcec056f54df9b4d98d4d15b1e9f612ac1432.tar.gz |
[ruby/syntax_suggest] Add comments and refactor AroundBlockScan methods
https://github.com/ruby/syntax_suggest/commit/cecd12292c
Diffstat (limited to 'lib/syntax_suggest/parse_blocks_from_indent_line.rb')
-rw-r--r-- | lib/syntax_suggest/parse_blocks_from_indent_line.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/syntax_suggest/parse_blocks_from_indent_line.rb b/lib/syntax_suggest/parse_blocks_from_indent_line.rb index d1071732fe..241ed6acb4 100644 --- a/lib/syntax_suggest/parse_blocks_from_indent_line.rb +++ b/lib/syntax_suggest/parse_blocks_from_indent_line.rb @@ -36,8 +36,8 @@ module SyntaxSuggest # Builds blocks from bottom up def each_neighbor_block(target_line) scan = AroundBlockScan.new(code_lines: code_lines, block: CodeBlock.new(lines: target_line)) - .skip(:empty?) - .skip(:hidden?) + .force_add_empty + .force_add_hidden .scan_while { |line| line.indent >= target_line.indent } neighbors = scan.code_block.lines |