peerapats / atom-language-gherkin

Gherkin language support for Atom
26 stars 18 forks source link

Step definition is not highlighted correctly #4

Open npassaro opened 9 years ago

npassaro commented 9 years ago

Hi! When you have a step format like this:

And /^I click "([^"]*)" button on the pop-up window$/ do |button_text|

After the " within the regex capture is understood as the beginnig of a string capture highlighting everything until the next ", meaning, from the string above the following is highlighted as a string:

"([^"..." button on the pop-up window$/ do |button_text|
...
peerapats commented 9 years ago

Not sure you waiting or not, however I have fixed on v1.0.3 please check.

follmann commented 8 years ago

This issue is actually invalid, since the code presented is Ruby code from a step definition file, so the highlighting for Ruby should be applied, it's not a Gherkin file. The changed expression for double quotes from (\\".*?[^\\"]\\") to (\\s\\".*?[^\\"]\\"\\s) lead to other issues (commit 76e233fc9df4a6566d4429dede015eeb00b36d48) . Like punctation following a double quote breaking the highlighting. So I suggest to go back to the former expression that worked as intended. If you want I can create a PR for that.

screen shot 2016-05-12 at 10 15 50

peerapats commented 8 years ago

@follmann I have merged your PR, it would be publish in v1.0.4, thanks for your contributed.

follmann commented 8 years ago

Thanks for merging and releasing immediately!