Skip to content

Commit ad6a190

Browse files
committed
Don't allow whitespace in link destination even with <> (spec 0.24, #28)
1 parent 4ad942e commit ad6a190

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

commonmark/src/main/java/org/commonmark/internal/InlineParserImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class InlineParserImpl implements InlineParser {
4040
"\\((" + ESCAPED_CHAR + "|[^)\\x00])*\\))");
4141

4242
private static final Pattern LINK_DESTINATION_BRACES = Pattern.compile(
43-
"^(?:[<](?:[^<>\\n\\\\\\x00]" + '|' + ESCAPED_CHAR + '|' + "\\\\)*[>])");
43+
"^(?:[<](?:[^<> \\t\\n\\\\\\x00]" + '|' + ESCAPED_CHAR + '|' + "\\\\)*[>])");
4444

4545
private static final Pattern LINK_DESTINATION = Pattern.compile(
4646
"^(?:" + REG_CHAR + "+|" + ESCAPED_CHAR + "|\\\\|" + IN_PARENS_NOSP + ")*");

0 commit comments

Comments
 (0)