Skip to content

Commit

Permalink
recognize \R for multiline parsing
Browse files Browse the repository at this point in the history
\R matches _any_ unicode newline sequence, and may appear in custom
groovy parsers besides the usual \r and \n.
  • Loading branch information
Bananeweizen committed Dec 2, 2024
1 parent b74d86b commit fc29fc0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public GroovyParser(final String id, final String name,
}

private static boolean containsNewline(final String expression) {
return StringUtils.contains(expression, "\\n") || StringUtils.contains(expression, "\\r");
return StringUtils.containsAny(expression, "\\n", "\\r", "\\R");
}

/**
Expand Down

0 comments on commit fc29fc0

Please sign in to comment.