Skip to content

Commit 4086c8d

Browse files
committed
fixed attribute splitting to use only commas outside double quotes
1 parent c5714a2 commit 4086c8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/javafxlibrary/utils/finder/XPathFinder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private void parseAttributes(Node node) {
158158

159159
// TODO: Nodes with LabeledText containing ']'-characters will have an effect on the last attribute, fix
160160
String attributes = " " + nodeString.substring(nodeString.indexOf('[') + 1, nodeString.lastIndexOf(']'));
161-
String[] attributeArray = attributes.split(",");
161+
String[] attributeArray = attributes.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
162162
StringBuilder attributeBuilder = new StringBuilder();
163163
boolean unsupported = false;
164164

@@ -193,4 +193,5 @@ private String getSelector(Node node) {
193193
// TODO: Are there more possible characters for type selectors that require replacing?
194194
return node.getTypeSelector().replaceAll("\\$", "");
195195
}
196+
196197
}

0 commit comments

Comments
 (0)