diff --git a/lib/marked.js b/lib/marked.js index 9f1584bb3b..a0d1a3ccdc 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -451,7 +451,7 @@ var inline = { escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, url: noop, - tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, + tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/, link: /^!?\[(inside)\]\(href\)/, reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, diff --git a/test/new/angle-with-autolink.html b/test/new/angle-with-autolink.html new file mode 100644 index 0000000000..ba2fbbecf5 --- /dev/null +++ b/test/new/angle-with-autolink.html @@ -0,0 +1,7 @@ +

Open angle bracket with link:

+ +

<http://example.com

+ +

With space: < http://example.com

+ +

With content: <1 http://example.com

diff --git a/test/new/angle-with-autolink.text b/test/new/angle-with-autolink.text new file mode 100644 index 0000000000..4fad3d24ba --- /dev/null +++ b/test/new/angle-with-autolink.text @@ -0,0 +1,7 @@ +Open angle bracket inline with link: + +< + +With space: < + +With content: <1 diff --git a/test/tests/angle-with-autolink.html b/test/tests/angle-with-autolink.html new file mode 100644 index 0000000000..ba2fbbecf5 --- /dev/null +++ b/test/tests/angle-with-autolink.html @@ -0,0 +1,7 @@ +

Open angle bracket with link:

+ +

<http://example.com

+ +

With space: < http://example.com

+ +

With content: <1 http://example.com

diff --git a/test/tests/angle-with-autolink.text b/test/tests/angle-with-autolink.text new file mode 100644 index 0000000000..4fad3d24ba --- /dev/null +++ b/test/tests/angle-with-autolink.text @@ -0,0 +1,7 @@ +Open angle bracket inline with link: + +< + +With space: < + +With content: <1