We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d877177 commit c33c7d2Copy full SHA for c33c7d2
1 file changed
richtextfx/src/main/java/org/fxmisc/richtext/CodeArea.java
@@ -54,12 +54,13 @@ public CodeArea(@NamedArg("text") String text) {
54
selectRange(0, 0);
55
}
56
57
- protected Pattern WORD_PATTERN = Pattern.compile( "\\w+" );
+ protected Pattern WORD_PATTERN = Pattern.compile( "\\w+", Pattern.UNICODE_CHARACTER_CLASS );
58
protected Pattern WORD_OR_SYMBOL = Pattern.compile(
59
"([\\W&&[^\\h]]{2}" // Any two non-word characters (excluding white spaces), matches like:
60
// != <= >= == += -= *= -- ++ () [] <> && || // /* */
61
+"|\\w*)" // Zero or more word characters [a-zA-Z_0-9]
62
+"\\h*" // Both cases above include any trailing white space
63
+ , Pattern.UNICODE_CHARACTER_CLASS
64
);
65
66
/**
0 commit comments