Closed dmitry-timofeev closed 4 years ago
Yes, this is actually intentional. The inclusion is intended to collect every block that is 'adjacent' to the matching substring.
It's simplistic and may not always be desirable, but I felt that it was a simple solution that (worst case) collects too much content, rather than having a complex solution to pick out which of many possible blocks is the right one.
I'm not sure if this could be made easier to work with, but would consider any suggestions!
I see, that makes perfect sense! Doing anything Java-specific will make it harder to support any source language.
I'll mark this as closed, as the workaround you outline is probably just 'the way it should be used'.
Overview
If a method is included with
block:<method_name>
and this method is used in the same file with a lambda with curly braces, such usages are included as well.E.g., with a file:
and a include declaration
the following result will be produced:
Workaround
There is a workaround using
inside_block
.Patched source (note
ci-foo
tag):include delcaration:
I wonder if that is the expected behaviour?