You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
This is a good one. The problem we have here is that in Gherkin comments begin with zero or more spaces, followed by a hash sign (#) and some amount of text. On the other hand, in markdown, a hash sign (#) denotes a level 1 heading.
Currently FeatureBook assumes that the whole description is written in markdown. Therefore the comments you put are parsed and interpreted as level 1 headings.
Feature: Adding comments
Visible line 1
# Commented line 1
Visible line 2
# Commented line 2Scenario: foo
Now the funny part is, whether we parse markdown in FeatureBoor or not, Gherkin parser fails with the example above. However it can handle the following spec:
Feature: Adding comments
Visible line 1
Visible line 2
# Commented line 1 # Commented line 2Scenario: foo
Don't get fooled by the syntax highlighter used by GitHub. It works fine but it's not using a parser under the covers.
In other words, if you comment out consecutive lines in the description it's fine for Gherkin, but it fails when comments are used interchangeably with description text. @banczi can you check what's the official syntax for using comments in Gherkin and prepare some test specs we should support? This might be a bug in Gherkin node package that we use.
hashtag in description doesn't work
The text was updated successfully, but these errors were encountered: