You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2021/01/07 19:14:24 UTC
[maven-doxia] branch master updated: Fix Java 7 compatibility that
was broken with DOXIA-616
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
The following commit(s) were added to refs/heads/master by this push:
new 82f421e Fix Java 7 compatibility that was broken with DOXIA-616
82f421e is described below
commit 82f421e86e26a830d6b4cf784f04a51441d47999
Author: Bertrand Martin <be...@sentrysoftware.com>
AuthorDate: Thu Jan 7 12:56:33 2021 +0100
Fix Java 7 compatibility that was broken with DOXIA-616
* Replaced `\h` and `\v` escape sequences that are not supported in Java 7 regex *Pattern*
---
.../java/org/apache/maven/doxia/module/markdown/MarkdownParser.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
index 971c35f..37a41a5 100644
--- a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
+++ b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
@@ -87,15 +87,15 @@ public class MarkdownParser
private static final Pattern METADATA_SECTION_PATTERN = Pattern.compile(
"\\A^\\s*"
+ "(?:title|author|date|address|affiliation|copyright|email|keywords|language|phone|subtitle)"
- + "\\h*:\\h*\\V*\\h*$\\v+"
- + "(?:^\\h*[^:\\v]+\\h*:\\h*\\V*\\h*$\\v+)*",
+ + "[ \\t]*:[ \\t]*[^\\r\\n]*[ \\t]*$[\\r\\n]+"
+ + "(?:^[ \\t]*[^:\\r\\n]+[ \\t]*:[ \\t]*[^\\r\\n]*[ \\t]*$[\\r\\n]+)*",
Pattern.MULTILINE | Pattern.CASE_INSENSITIVE );
/**
* Regex that captures the key and value of a multimarkdown-style metadata entry.
*/
private static final Pattern METADATA_ENTRY_PATTERN = Pattern.compile(
- "^\\h*([^:\\v]+?)\\h*:\\h*(\\V*)\\h*$",
+ "^[ \\t]*([^:\\r\\n]+?)[ \\t]*:[ \\t]*([^\\r\\n]*)[ \\t]*$",
Pattern.MULTILINE );
/**