1
0
mirror of https://github.com/danog/blackfriday.git synced 2024-11-26 20:14:43 +01:00

Fix checking of backslash in link text (#510) (#511)

This commit is contained in:
autopp 2019-01-21 03:36:43 +09:00 committed by Vytautas Šaltenis
parent 55e5149f61
commit 535ad76f61
3 changed files with 4 additions and 1 deletions

View File

@ -278,7 +278,7 @@ func link(p *Markdown, data []byte, offset int) (int, *Node) {
case data[i] == '\n': case data[i] == '\n':
textHasNl = true textHasNl = true
case data[i-1] == '\\': case isBackslashEscaped(data, i):
continue continue
case data[i] == '[': case data[i] == '[':

View File

@ -8,4 +8,6 @@
<p><a href="/url/" title="title has spaces afterward">URL and title</a>.</p> <p><a href="/url/" title="title has spaces afterward">URL and title</a>.</p>
<p><a href="/url/">URL with backslash\</a>.</p>
<p>[Empty]().</p> <p>[Empty]().</p>

View File

@ -8,5 +8,6 @@ Just a [URL](/url/).
[URL and title](/url/ "title has spaces afterward" ). [URL and title](/url/ "title has spaces afterward" ).
[URL with backslash\\](/url/).
[Empty](). [Empty]().