viggity
viggity

Reputation: 15237

Can I escape the pipe in specflow (or gherkin)

I've got a specflow step table that I want to have the | (pipe) character as a part of the content.

Example:

Then the data should be
    | Field     | Value  |
    | SomeField | a|b|c  |

But this doesn't work. How can I escape the pipe character?

Upvotes: 43

Views: 16421

Answers (1)

viggity
viggity

Reputation: 15237

Bah. I can't believe I didn't find this earlier. You CAN escape a pipe with the backslash, but the specflow syntax highlighter gets confused by it.

Then the data should be
    | Field     | Value    |
    | SomeField | a\|b\|c  |

Upvotes: 67

Related Questions