Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gherkin: Escape triple backticks in alternative docstring #889

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Feb 6, 2020

The Gherkin parser did not handle escaped back strings when the alternative
docstring seperator (triple backticks) were used.

Feature: A feature
  Scenario: A scenario
    Given I have a doc string
      ```
        \`\`\`
        Nested doc string
        \`\`\`
      ```

Fixes: #865

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • The change has been ported to Java.
  • The change has been ported to Ruby.
  • The change has been ported to JavaScript.
  • The change has been ported to Go.
  • I've added tests for my code.
  • I have updated the CHANGELOG accordingly.

The Gherkin parser did not handle escaped back strings when the alternative
docstring seperator (triple backticks) were used.

```
Feature: A feature
  Scenario: A scenario
    Given I have a doc string
      ```
        \`\`\`
        Nested doc string
        \`\`\`
      ```
```

Fixes: #865
…ed-triple-backticks-when-using-alternative-docstring-seperator
@mpkorstanje mpkorstanje merged commit 915868f into master Feb 6, 2020
@mpkorstanje mpkorstanje deleted the gherkin-fix-unescaped-triple-backticks-when-using-alternative-docstring-seperator branch February 6, 2020 16:47
Ajwah pushed a commit to Ajwah/ex-gherkin that referenced this pull request Jul 23, 2020
In the past 6 months, `cucumber/cucumber`-repo has seen a variet of
changes all of which have been fixed with this commit:
  * background to have `id`
  * rule to have `id`
  * examples to have `id`
  * ensure to only strip leading and trailing spaces in table cells.
  Keep newline intact
  * ensure escaped delimiter within doc_string is not recorded as escaped
  * doc_string has field change: contentType -> mediaType
  * ignore comments on tags

See:
  cucumber/common#891
  cucumber/common#880
  cucumber/common#889
  cucumber/common#800

At the time of this commit, master for `cucumber/cucumber` was at:
a7c593f479e7ae739b49108f79bba4853352d99c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gherkin: nested triple backticks in doc strings are escaped in the AST
1 participant