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

CSS multiline string incorrect syntax highlighting #28

Open
niwazukihon opened this issue May 4, 2024 · 2 comments
Open

CSS multiline string incorrect syntax highlighting #28

niwazukihon opened this issue May 4, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@niwazukihon
Copy link

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

  • VS Code Version: 1.89.0
  • OS Version: Windows 11

Steps to Reproduce:

  1. Create a css file. Write, for example
@import url('a-really-long\
    -url');
  1. The syntax highlighting is wrong. It seems to not interpret the string as a whole.

This was mentioned in issue microsoft/vscode#125739, which was closed and locked with a reference to another repo, but that repo was archived. Is there a plan to fix this bug?

@RedCMD
Copy link
Contributor

RedCMD commented May 4, 2024

should move report to https://github.com/microsoft/vscode-css

caused by \\s*. it matches the ending newline.
resulting in the begin anchor \\G being placed at the beginning of the next line (VSCode TextMate bug?)
causing ^(?<!\\G) to always fail
image

I don't know why \\s* was placed there
as it does nothing other than cause issues

@aeschli aeschli transferred this issue from microsoft/vscode May 6, 2024
@andreamah andreamah added the bug Issue identified by VS Code Team member as probable bug label May 6, 2024
@RedCMD
Copy link
Contributor

RedCMD commented Oct 5, 2024

caused by atom/language-css#123 2bc6abb
the anchor moving bug also happens in TextMate2.0
microsoft/vscode-textmate#237

I still don't know why capturing the newline is needed
and why (?<!\\G) is needed
as removing either or both fixes it

'begin': '\\\\$\\s*'
'end': '^(?<!\\G)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants