highlight.js
highlight.js copied to clipboard
(gherkin) highlight wrongly for unclosed '<'
Describe the issue
When there is a '<' in someline, but without a '>', the line and following lines are highlighted wrongly
Which language seems to have the issue?
gherkin
Are you using highlight
or highlightAuto
?
highlight
Sample Code to Reproduce
Feature: foo
Scenario: test scenario <foo>
Given a < b
Then a is less than b
Expected behavior
Additional context
The definition of variable likely needs to be tightened up: https://github.com/highlightjs/highlight.js/blob/fd307015164c05b191156efc378622293089c616/src/languages/gherkin.js#L34-L36
What are the exact syntax requirements for variables in Gherkin?
What are the exact syntax requirements for variables in Gherkin?
from https://cucumber.io/docs/gherkin/reference/#step-arguments
Scenario outlines allow us to more concisely express these scenarios through the use of a template with < >-delimited parameters
There are no accurate definition of step parameter, i think we can at least assume the < and > must be in the same line, and there aren't any '<' and '>' between the <>