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
because leading white spaces aren't remembered after parsing. It'd be so nice to keep them, to print the exact same table as was input.
Obviously it's not very important, but it is nice. And it's possible and backward compatible, but it's not very pretty. I had to alter the Lexer (parse the table and keep left padding) and the TableNode (remove left padding from values, but save their sizes).
I'll create a pull request.
The text was updated successfully, but these errors were encountered:
sorry, but the existing behavior matches the behavior of the official gherkin parsers (which explicitly mandate that table cells are trimmed from their whitespaces), so we won't diverge from it in our own parser.
Imagine you have an
Examples
table like this:Parsing and printing that table would print:
because leading white spaces aren't remembered after parsing. It'd be so nice to keep them, to print the exact same table as was input.
Obviously it's not very important, but it is nice. And it's possible and backward compatible, but it's not very pretty. I had to alter the
Lexer
(parse the table and keep left padding) and theTableNode
(remove left padding from values, but save their sizes).I'll create a pull request.
The text was updated successfully, but these errors were encountered: