Closed 43081j closed 3 years ago
@stramel i think its impossible to have an expression end on a different line to the attribute, so there is no test for it. but ill leave it there just as a safety net in case we somehow get some weird AST from the parser one day (or people using transforms etc)
i did add a fix and a test for quoted attributes though
LGTM!
We were getting the expression after the position, rather than immediately after the position.
@stramel if you get chance could you double check this logic:
old behaviour
Given the position of an attribute, find the quasi (string) which satisfies one of:
Then return the expression after that quasi.
Confusing logic, basically though it meant that all attributes in the quasi would return the expression i think...
Both would return an expression using this logic. Even though only prop should.
new behaviour
Because the previous logic made my brain melt a bit, i removed it and wrote it from scratch.
Now we just look for an expression which: