Open maave0 opened 1 year ago
Thanks for catching this issue! Capturing some notes in case someone is in a position to take a look.
What's happening is the gherkin is being read and parsed as strings; and as they are escaped when evaluating their length, they are being incorrectly calculated as shorter than their full unescaped length. Thus, the syntax highlighting is not fully applied.
There is also an issue where when parsing we may lose information e.g. \
and \\
may both evaluate to \\
.
Text | Token | Length | Expected Length |
---|---|---|---|
valu\e | valu\\e | 6 | 6 |
valu\\e | valu\\e | 6 | 7 |
👓 What did you see?
I made a .feature file that included a DataTable and Examples table. Some lines had the last several characters uncolored - The lines that had backslashes in them.
✅ What did you expect to see?
All the text inside the pipe formatting is colored.
📦 Which tool/library version are you using?
Cucumber extension v1.7.0 for VSCode installed on VS Code v1.74.0
🔬 How could we reproduce it?
Steps to reproduce the behavior:
Example: