cucumber / cucumber/language-service
Backslashes in DataTable messes with highlighting
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
### 👓 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:
1. Install Cucumber extension v1.7 onto VS Code v.1.74.0
2. Create a file called 'whatever.feature'
3. Write a scenario that includes either DataTable or Examples table
4. Put numerous backslashes inside the table's text
Example:
```gherkin
@BugReport
Feature: BugReport
Scenario: DEID117 Success
Given I submit a bug report
And I put backslashes in a DataTable or Examples table
| this line works fine |
| C:\\Users\\this line won't highlight the last 2 characters |
| I see it with escaped newlines and escaped backslashes. ( \n \n \n \n ) will produce 4 uncolored characters|
Then Cucumber team fixes the highlighting :)
```
Contributor guide
Research direction
Create the reported .feature file in VS Code with DataTable or Examples rows containing backslashes, then reproduce the highlighting failure. Trace the language service's Gherkin table highlighting from that input; done means all text inside the pipe-delimited table is colored, including trailing characters after backslashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100