summaryrefslogtreecommitdiff
path: root/spec/syntax_suggest/unit/code_search_spec.rb
diff options
authorschneems <[email protected]>2023-03-08 08:51:00 -0600
committerHiroshi SHIBATA <[email protected]>2023-04-06 15:45:28 +0900
commite5236471c3ce194199a6ceb70012eb2ca243407e (patch)
tree83455ffeecb919833e32998ed83fd018092cbd1c /spec/syntax_suggest/unit/code_search_spec.rb
parent33cfd262fcfe65737b6d4cde416a24cd81406885 (diff)
[ruby/syntax_suggest] Preserve whitespace in front of comments
When removing comments I previously replaced them with a newline. This loses some context and may affect the order of the indent search which in turn affects the final result. By preserving whitespace in front of the comment, we preserve the "natural" indentation order of the line while also allowing the parser/lexer to see and join naturally consecutive (method chain) lines. close https://github.com/ruby/syntax_suggest/pull/177
Diffstat (limited to 'spec/syntax_suggest/unit/code_search_spec.rb')
-rw-r--r--spec/syntax_suggest/unit/code_search_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/syntax_suggest/unit/code_search_spec.rb b/spec/syntax_suggest/unit/code_search_spec.rb
index f836ba36f3..9a8115c0c8 100644
--- a/spec/syntax_suggest/unit/code_search_spec.rb
+++ b/spec/syntax_suggest/unit/code_search_spec.rb
@@ -338,6 +338,7 @@ module SyntaxSuggest
end
EOM
search.call
+ puts "done"
expect(search.invalid_blocks.join).to eq(<<~'EOM')
Foo.call do