You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Text block breaks syntax highlighting if an odd number (>=3) of double quotes appear inside the text block #1264
As soon as a text block contains an odd number (>=3) of double quotes, the rest of the file is colored as if it were part of the text block (but there's no compilation errors & things like autocompletion etc. work, it's just syntax highlighting that breaks).
Environment
Operating System: Windows 10
JDK version: 13.0.1
Visual Studio Code version: 1.42.0
Java extension version: 0.55.1
Steps To Reproduce
Create a Java file with a text block that contains 3 double quotes, e.g.
changed the title [-]Text block breaks syntax highlighting as soon as 3 quotes appear inside the text block[/-][+]Text block breaks syntax highlighting if an odd number (>=3) of double quotes appear inside the text block[/+]on Feb 9, 2020
Also, it'd be great if the \ (line-terminator) character could be highlighted too, so it's not confused with text inside the block. Of course, I think that has nothing to do with this specific issue, so I can open a separate ticket for that if it makes sense 🙂
I've just come across the same issue as with the post by @Eskibear above.
I think, if possible, at a basic level all double quotes inside triple quotes blocks should be treated as automatically escaped as that's how the compiler sees it.
Activity
[-]Text block breaks syntax highlighting as soon as 3 quotes appear inside the text block[/-][+]Text block breaks syntax highlighting if an odd number (>=3) of double quotes appear inside the text block[/+]akaroml commentedon Feb 17, 2020
@Vigilans did you merge the syntax highlighting PRs from Atom to VS Code?
And please let us know if this bug is fixed by any of your PRs.
JoseLion commentedon Oct 8, 2021
It seems this is still an issue on
v0.82.0. Any news around this? 🙂JoseLion commentedon Oct 8, 2021
Also, it'd be great if the
\(line-terminator) character could be highlighted too, so it's not confused with text inside the block. Of course, I think that has nothing to do with this specific issue, so I can open a separate ticket for that if it makes sense 🙂dropofwill commentedon May 18, 2022
Line-terminator seems to cause the same issue, e.g.:
Eskibear commentedon May 23, 2022
(originally reported by @jflorez-planittesting)
Environment:
Step to Reproduce:

create a text block with a json inside it, add a http URL to a JSON value
Expected Behavior:
Syntax highlighting is unaffected
Actual Behavior:
Syntax highlighting inside the text block and in subsequent Java code is altered and colours deviate from the configured theme
pangoleaf commentedon Oct 25, 2022
I've just come across the same issue as with the post by @Eskibear above.
I think, if possible, at a basic level all double quotes inside triple quotes blocks should be treated as automatically escaped as that's how the compiler sees it.
GustavoASC commentedon Mar 17, 2023
I am also facing this same issue
Kamilake commentedon Apr 20, 2023
I can't believe there hasn't been any news here in three years.
hopehadfield commentedon Jul 25, 2023
All issues regarding syntax highlighting in text blocks have been fixed via #3200.
Before:

After:

Closing as completed.