Open erikedin opened 3 years ago
We already know Python behave allows that. I just tried cucumber-js as well and it also works there. So I don't think blank lines matter.
Same issue with blank line right after Scenario
:
julia> ExecutableSpecifications.Gherkin.parsefeature("""
Feature: foo
Scenario: bar
Given waz
When woo
Then cool
""")
ERROR: MethodError: no method matching getindex(::Nothing, ::Symbol)
Stacktrace:
[1] parsescenario!(::ExecutableSpecifications.Gherkin.ByLineParser) at /Users/tomkwong/.julia/dev/ExecutableSpecifications/src/Gherkin.jl:443
[2] parsefeature(::String; options::ExecutableSpecifications.Gherkin.ParseOptions) at /Users/tomkwong/.julia/dev/ExecutableSpecifications/src/Gherkin.jl:488
[3] parsefeature(::String) at /Users/tomkwong/.julia/dev/ExecutableSpecifications/src/Gherkin.jl:474
[4] top-level scope at REPL[65]:1
A scenario like this should be allowed optionally, or perhaps unconditionally. Look it up in the reference, if empty lines should be allowed here.