Consider using a new Java grammar: Text block(JEP 378) breaks Java syntax highlighting
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.73.1
- OS Version: Windows 10 22H2 19045.2251
Steps to Reproduce:
Create a Java file with a text block that contains double quotes.
Current Result Notice the codes after text block are fully orange.
Expected Result Syntax highlighting is correct.
Workaround Add an escape character in each double quote.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Text block breaks syntax highlighting if an odd number (>=3 ...
Create a Java file with a text block that contains 3 double quotes, e.g.. class Foo { private static final String BAR =...
Read more >JEP 378: Text Blocks - OpenJDK
Add text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, ......
Read more >JEP 378: Text Blocks. New way to use String in Java
In this first example, when you need to write Html code. Before this feature, we need to do this: var html = "<html>\n"...
Read more >Text Blocks (JEP 378) - javaalmanac.io
Text Blocks (JEP 378). Text blocks, added in their final form to Java 15, are a new form of string literals that is...
Read more >Programmer's Guide to Text Blocks - Oracle Help Center
This guide assembles practical usage advice for text blocks, along with some style guidelines. Introduction. A text block's principalis munus is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Given that https://github.com/atom/language-java will be archived, I’m repurposing this issue for considering a new Java grammar.
The current syntax highlighter doesn’t support java
Text Blocks
prob should report to https://github.com/atom/language-java