fsprojects / TickSpec

Lean .NET BDD framework with powerful F# integration
Apache License 2.0
133 stars 23 forks source link

Newlines are removed from doc strings #60

Closed deyanp closed 1 year ago

deyanp commented 1 year ago

It seems Tickspec is filtering out all empty lines in a doc string, e.g.

...
Then the generated file has the following content
"""
line1

line3

line5

"""

The resulting argument passed to the Then step looks like

line1
line3
line5

Can you pls confirm this is a bug in TickSpec (Gherkin seems to preserve newlines in doc strings) ?

bartelink commented 1 year ago

Can't think of a good reason to strip them; perhaps the original intent was to strip ones at top and tail? (Can't think of a particularly good reason for that either)

mchaloupka commented 1 year ago

The original idea was to remove all empty lines to simplify parsing. I don't think that there was no intention to remove empty lines from doc strings.

Created pull requests: https://github.com/fsprojects/TickSpec/pull/62