Open Earlopain opened 8 months ago
Thank you for the bug report!
I think we might be able to fix this by using a more elaborate regex when interpolation is present. For example, if we have
describe "something #{var} other thing" do
end
We could push something <dynamic reference> other thing
to the stack to ensure we maintain the structure properly. And for running it, we could turn the dynamic references into match all regexes, something like /something .* other thing/
, which would I think is enough to match them.
Oh, that's a great idea. I will implement this
Description
There's a bit more to this but overall this is the gist of it.
describe
pushes to thegroup_id_stack
. If a describe can't be handled a code lens will not be created, which in turn means thatit
inside of thatdescribe
block references a group that doesn't exist (that at least is my current understanding of why this happens).You can reproduce this with the following snippet:
The green button is still there for some reason, but the other code lens that would in theory work does not get displayed.
The following should also not break, however I'm not sure how many codelenses it should actually display. One for
describe Foo
and the bottommostit
for sure. Ideally for thedescribe
with a normal string and its testcase as well but the first one might be simpler to implement as a first pass.