-
Notifications
You must be signed in to change notification settings - Fork 30
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
Red text highlighting in VSCode extension when more than one line in the title block #501
Comments
I can report the same behavior on MacOs 14.5 (23F79) with VScode 1.92.0. |
Same here, using Windows with VS Code 1.92.0, Quarto 1.5.56, and R 4.4.1. If you remove the YAML codes at the top, you'll notice that your code appears with normal syntax highlighting. However, this workaround will prevent your code from rendering properly. A temporary solution is to downgrade to VS Code 1.91.1, where everything works fine. The Quarto team will likely resolve this issue in the next version. Until then, don't forget to disable auto-updates in VS Code to avoid any disruption. |
Also, notice that I'm using pandoc syntax, but it's exactly the same when both delimiters are |
Experiencing the same behavior on Linux Mint 21.3 with VS Code v1.92.0 Quarto v1.5.54 |
According to microsoft/vscode#224627 (comment) it's not a regression in VSCode but that the qmd grammar should follow the new grammar in VSCode. |
FrontMatter integration should be updated to match Markdowns quarto/apps/vscode/syntaxes/quarto.tmLanguage.yaml Lines 226 to 231 in 06678d5
|
Weirdly, it does not seem to happen on macOS, but it does on UNIX and Windows system. Screen.Recording.2024-08-05.at.13.10.20.mov |
@RedCMD From what I understand, a simple PR to update the definition would be enough, correct? |
Ok, I've made a PR and reached out to the repository owners. |
It does happen on macOS Sonoma for me. |
Thanks. The fix is being tested to ensure it does not break other things that use the extension. |
I'm running the Quarto VSCode Extension version 1.113.0, inside of a dev container. I seem to have the same problem when downgrading to 1.112.0, so I don't think the following problem is directly related to a change in the extensions itself.
I'm not sure what has changed recently to cause this, but whenever I open a qmd file with more than one line in my title block, the quarto extension is causing all python code to show up as red text.
For example, this is fine:
As is this:
But if I add another line to the title block, I get red python text:
Even just an extra blank line will do it:
This has only just started happening for me, and VSCode's extension bisect has confirmed that it is being caused by the Quarto Extension.
Any ideas on what could be happening and how to fix it would be very appreciated. It appears to have no impact on the functionality otherwise, but it is a lot harder to follow the code when everything is red.
The text was updated successfully, but these errors were encountered: