-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Description
RSyntaxTextArea formats the comments incorrectly in a Java 8 application. They appear fine in a Java 21 application. I have tested with the SyntaxEditingStyle SYNTAX_STYLE_JAVA, SYNTAX_STYLE_CSHARP and SYNTAX_STYLE_XML
Steps to Reproduce
Specific steps to reproduce the behavior:
- Create a new project
- Add the RSyntaxTextArea dependency
- Add a new file TextEditorDemo.java file, add the code from the Example Usage in the GitHub project readme.md
- Run the project
- In the text area, type a comment. For example "// This is a Comment" or "/* This is a Comment */"
Expected behavior
I would expect to see the comments as typed, highlighted in green
Actual behavior
The comment text is replaced with illegible characters. The text is correct in the background, and can be copied and pasted into another app fine
Screenshots
Add a screenshot if it helps explain the problem.
This is screenshot from Java 8. The text entered is "//hello, this is a comment in Java 8"

This is screenshot from Java 21.

Java version
What version of Java are you running?
Error exists in Java 8. Error does not exist in Java 21 and comments are shown fine
Additional context
Discovered when using version 3.6.1 but still occurs in 3.6.2