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

Escaped pipe symbol in table confuses syntax highlighting in Visual Studio #138

Open
9 of 32 tasks
icnocop opened this issue May 29, 2019 · 1 comment
Open
9 of 32 tasks

Comments

@icnocop
Copy link
Contributor

icnocop commented May 29, 2019

SpecFlow Version:

  • 3.0
  • 2.4
  • 2.3
  • 2.2
  • 2.1
  • 2.0
  • 1.9

Used Test Runner

  • SpecFlow+Runner
  • MSTest
  • NUnit
  • Xunit

Version number:
Visual Studio 2017 15.9.12

Project Format of the SpecFlow project

  • Classic project format using packages.config
  • Classic project format using <PackageReference> tags
  • Sdk-style project format

.feature.cs files are generated using

  • SpecFlow.Tools.MsBuild.Generation NuGet package
  • SpecFlowSingleFileGenerator custom tool

Visual Studio Version

  • VS 2019
  • VS 2017
  • VS 2015

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

  • Enabled
  • Disabled

Are the latest Visual Studio updates installed?

  • Yes
  • No

.NET Framework:

  • >= .NET 4.5
  • before .NET 4.5
  • .NET Core 2.0
  • .NET Core 2.1
  • .NET Core 2.2
  • .NET Core 3.0

Test Execution Method:

  • Visual Studio Test Explorer
  • TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • Command line – PLEASE SPECIFY THE FULL COMMAND LINE

<SpecFlow> Section in app.config or content of specflow.json

Repro Project

UnitTestProject3.zip

Issue Description

If I escape the pipe symbol in a table, the SpecFlow syntax highlighter gets confused.

Steps to Reproduce

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

Notice that the b in the table and everything to the right of it is colored black.
I expected only the non-escaped pipe symbols to be colored black in that row.

See https://stackoverflow.com/questions/12960803/can-i-escape-the-pipe-in-specflow-or-gherkin

Thank you.

@SabotageAndi
Copy link
Contributor

Interesting. TBH I didn't know you can escape the pipe in a table.

@SabotageAndi SabotageAndi transferred this issue from SpecFlowOSS/SpecFlow Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants