Skip to content

Commit 8bec00c

Browse files
committed
Update XMLEditorDemo.java (#1122)
Accommodate multi-line comments and also allow tags in comments.
1 parent e7b90ff commit 8bec00c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/XMLEditorDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
public class XMLEditorDemo extends Application {
2020

2121
private static final Pattern XML_TAG = Pattern.compile("(?<ELEMENT>(</?\\h*)(\\w+)([^<>]*)(\\h*/?>))"
22-
+"|(?<COMMENT><!--[^<>]+-->)");
22+
+"|(?<COMMENT><!--(.|\\v)+?-->)");
2323

2424
private static final Pattern ATTRIBUTES = Pattern.compile("(\\w+\\h*)(=)(\\h*\"[^\"]+\")");
2525

0 commit comments

Comments
 (0)