-
Notifications
You must be signed in to change notification settings - Fork 4
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
Heredoc + line escape causes problems #73
Comments
I'm having this issue as well with multiline strings / heredocs that use the I noticed that several characters break the highlighting. I'd specifically like if the It's fairly common to use POD documentation in shell scripts by leveraging heredocs, and it's convenient to end the heredoc and the pod section with a single Sources: wikipedia, 2007 blogpost |
i took a stroll through the code, still not 100% on this, but i believe it comes down to this line and the similar ones in the following sections: better-shell-syntax/main/main.rb Line 959 in 7220287
All the heredocs: I'm no expert, but I can't think of a reason why this would need to be constrained to a "normal statement" the same way regular lines of shell script would be. |
@maxprehl Thanks for looking through the source, thats always helpful for me. Unfortunately that code is needed because stuff like this is valid. (It highlights the cat <<<'thing' | grep howdy
hello
Hi
Howdy
thing However the issue for The backslash problem at the top is not going to be an easy fix because Textmate parsers can only see one line at a time, and just use clever hacks to pretend to do multi-line parsing |
Does this issue occur when all extensions are disabled?: Yes
Metadata
Version: 1.85.1
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:47:11.635Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 5.15.0-91-generic snap
Bug
Initial variant
Code:
As you can see, even here in Github everything after the
oh no's
has wrong colors.Other variant
Code:
Working example
Without single quote
This works in VSCode but not on Github.
Code:
Without line break after <<
This works in VSCode and on Github.
Code:
Originally from @NicolasGoeddel in microsoft/vscode#202493
The text was updated successfully, but these errors were encountered: