Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Java 7 compatibility that was broken with DOXIA-616 #54

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

/**
Expand Down