question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider using a new Java grammar: Text block(JEP 378) breaks Java syntax highlighting

See original GitHub issue

Does 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. img-20221202-165011

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. img-20221202-184608

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alexr00commented, Dec 5, 2022

Given that https://github.com/atom/language-java will be archived, I’m repurposing this issue for considering a new Java grammar.

1reaction
RedCMDcommented, Dec 2, 2022

The current syntax highlighter doesn’t support java Text Blocks prob should report to https://github.com/atom/language-java

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found