summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorschneems <richard.schneeman+foo@gmail.com>2023-04-14 17:32:45 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-04-25 14:43:06 +0900
commit3d5febf65b46f1a76759aa68d10f0888748831ab (patch)
tree9c4828657ec31154f7529476c7bde8f77181e529 /common.mk
parentf77dc6fb1630f01c2b5dd1a407931c829ad6e77c (diff)
downloadruby-3d5febf65b46f1a76759aa68d10f0888748831ab.tar.gz
[ruby/syntax_suggest] Clean up output
I previously left a comment stating I didn't know why a certain method existed. In investigating the code in `CaptureCodeContext#capture_before_after_kws` I found that it was added as to give a slightly less noisy output. The docs for AroundBlockScan#capture_neighbor_context only describe keywords as being a primary concern. I modified that code to only include lines that are keywords or ends. This reduces the output noise even more. This allows me to remove that `start_at_next_line` method. One weird side effect of the prior logic is it would cause this code to produce this output: ``` class OH def hello def hai end end ``` ``` 1 class OH > 2 def hello 4 def hai 5 end 6 end ``` But this code to produce this output: ``` class OH def hello def hai end end ``` ``` 1 class OH > 2 def hello 4 end 5 end ``` Note the missing `def hai`. The only difference between them is that space. With this change, they're now both consistent. https://github.com/ruby/syntax_suggest/commit/4a54767a3e
Diffstat (limited to 'common.mk')
0 files changed, 0 insertions, 0 deletions