Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/syntax_search/block_expand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def call(block)

def expand_indent(block)
block = AroundBlockScan.new(code_lines: @code_lines, block: block)
.skip(:hidden?)
.stop_after_kw
.scan_adjacent_indent
.code_block
Expand Down
2 changes: 2 additions & 0 deletions spec/unit/code_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def hello
1 require 'rails_helper'
2
3 RSpec.describe AclassNameHere, type: :worker do
❯ 4 describe "thing" do
❯ 16 end # line 16 accidental end, but valid block
❯ 30 end # mismatched due to 16
31 end
EOM
Expand Down