Skip to content

Commit 68f91ed

Browse files
committed
Make XsdDocumentedTests Parsing More Lenient
Closes gh-9830
1 parent 8400b84 commit 68f91ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/src/test/java/org/springframework/security/config/doc/XsdDocumentedTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ else if (id.endsWith("-parents")) {
201201
docAttrName = id.substring(0, id.length() - 8);
202202
currentDocAttrNameToElmt = docAttrNameToParents;
203203
}
204-
else if (docAttrName != null && !id.startsWith(docAttrName)) {
204+
else if (id.endsWith("-attributes") || docAttrName != null && !id.startsWith(docAttrName)) {
205205
currentDocAttrNameToElmt = null;
206206
docAttrName = null;
207207
}
208208
}
209209
if (docAttrName != null && currentDocAttrNameToElmt != null) {
210-
String expression = "^\\* <<(nsa-.*),.*>>$";
210+
String expression = ".*<<(nsa-.*),.*>>.*";
211211
if (line.matches(expression)) {
212212
String elmtId = line.replaceAll(expression, "$1");
213213
currentDocAttrNameToElmt.computeIfAbsent(docAttrName, (key) -> new ArrayList<>()).add(elmtId);

0 commit comments

Comments
 (0)