Skip to content

Commit

Permalink
[asciidoc] small optimization for description list matching
Browse files Browse the repository at this point in the history
  • Loading branch information
rmannibucau committed Mar 10, 2024
1 parent 0e61a45 commit ac7520a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private List<Element> parseLine(final Reader reader, final String line,
}
}

{
if (line.startsWith("*")) {
final var matcher = UNORDERED_LIST_PREFIX.matcher(line);
if (matcher.matches() && matcher.group("wildcard").length() == 1) {
reader.rewind();
Expand All @@ -594,7 +594,7 @@ private List<Element> parseLine(final Reader reader, final String line,
}
}

{
if (line.contains("::")) {
final var matcher = DESCRIPTION_LIST_PREFIX.matcher(line);
if (matcher.matches() && matcher.group("marker").length() == 2 &&
// and is not a macro
Expand Down

0 comments on commit ac7520a

Please sign in to comment.