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

pull/527/head
autopp 2019-01-21 03:38:36 +09:00 committed by Vytautas Šaltenis
parent abafa45cd8
commit 8c3eacd7a5
3 changed files with 4 additions and 1 deletions

View File

@ -252,7 +252,7 @@ func link(p *parser, out *bytes.Buffer, data []byte, offset int) int {
case data[i] == '\n':
textHasNl = true
case data[i-1] == '\\':
case isBackslashEscaped(data, i):
continue
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/">URL with backslashes\</a>.</p>
<p>[Empty]().</p>

View File

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