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

Incorrect syntax highlighting with YAML plain flow scalar multiline strings #134264

Closed
izhess opened this issue Oct 1, 2021 · 2 comments
Closed
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@izhess
Copy link

izhess commented Oct 1, 2021

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.60.2
  • OS Version: macOS Big Sur, Version 11.6

Steps to Reproduce:

  1. Write YAML with multiline string, like this:
bar: Multiline start
  | newline pipe character is valid in Plain Flow Scalar, but is highlighted as error
baz: quux
  1. Save the YAML-file and notice the syntax highlight is incorrect:

image

@mkjor
Copy link

mkjor commented Oct 15, 2021

I found a similar issue with the handling of multiline text. If the 2nd and following lines are beginning with a -, the syntax highlighting formats the - as an array element.

For example:

array:
  - entry 1
  - entry 2
string: Line 1
  - line 2
  - line 3

is rendered as

grafik

There is no visible difference of the array and string.

Hint: The GitHub highlighting has the same problem 😄

@alexr00
Copy link
Member

alexr00 commented Oct 28, 2021

Upstream issue: textmate/yaml.tmbundle#28

@alexr00 alexr00 closed this as completed Oct 28, 2021
@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Oct 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants