Skip to content

Text block highlighting incorrect when it contains the substring: "/* #2896

Closed

Description

@ktbytechibong

Syntax highlighting for text blocks breaks when it contains the substring "/*. It seems like the highlighter thinks that that is the start of a multi-line comment.

Environment
  • Operating System: Ubuntu 22.04
  • JDK version: 17
  • Visual Studio Code version: 1.74.3
  • Java extension version: v1.14.0
Steps To Reproduce
  1. Create a Java file with a text block containing the substring with the 3 characters: "/*
public class Blah {
    public static void main(String[] args) {
        String files = """
                "/*.java"
                """;
    }
}
Current Result

Everything after the /* gets highlighted as comments (green):
image

Expected Result

Text inside code block should not be treated as (start of a) comment.

Additional Informations

Note that the highlighting behaves correctly when there is no " character right before the /*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions