Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Capture leading and trailing whitespace in example table cells #203

Open
fakeleft opened this issue Oct 16, 2012 · 1 comment
Open

Capture leading and trailing whitespace in example table cells #203

fakeleft opened this issue Oct 16, 2012 · 1 comment

Comments

@fakeleft
Copy link

It looks like pipes and newlines can now be escaped and captured within an example table cell. Can we also use \s and \t for capturing leading/trailing spaces and tabs, like so:

Example:
| foo | bar |
| hello\s | \tworld |

@jeduden
Copy link

jeduden commented Sep 1, 2014

Yes, indeed, but I believe the escaping is actually broken. See the following code:
https://github.com/cucumber/gherkin/blob/master/ragel/lexer.java.rl.erb#L131

If you want to escape a backslash which is followed by the letter n, the first replacement will consume parts of the backslashes that were actually part of the token to escape a backslash.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants