mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01:00
Fix #180 again
The check was introduced withd28de22
, when fixing #172 and #173. Then I removed it withbcd6dd8
when fixing #180 And then it was reintroduced with232d06c
when fixing regression. It seems that the check can be removed again. All these cases now have tests (including the one from69f51af
, which seems to have landed to v1 only, copying it here) and they all pass.
This commit is contained in:
parent
ad7f7c56d5
commit
7500a7e2ed
@ -604,6 +604,9 @@ func TestReferenceLink(t *testing.T) {
|
|||||||
|
|
||||||
"[ref]\n [ref]: ../url/ \"title\"\n",
|
"[ref]\n [ref]: ../url/ \"title\"\n",
|
||||||
"<p><a href=\"../url/\" title=\"title\">ref</a></p>\n",
|
"<p><a href=\"../url/\" title=\"title\">ref</a></p>\n",
|
||||||
|
|
||||||
|
"[link][ref]\n [ref]: /url/",
|
||||||
|
"<p><a href=\"/url/\">link</a></p>\n",
|
||||||
}
|
}
|
||||||
doLinkTestsInline(t, tests)
|
doLinkTestsInline(t, tests)
|
||||||
}
|
}
|
||||||
|
@ -639,9 +639,6 @@ func scanLinkRef(p *parser, data []byte, i int) (linkOffset, linkEnd, titleOffse
|
|||||||
for i < len(data) && data[i] != ' ' && data[i] != '\t' && data[i] != '\n' && data[i] != '\r' {
|
for i < len(data) && data[i] != ' ' && data[i] != '\t' && data[i] != '\n' && data[i] != '\r' {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
if i == len(data) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
linkEnd = i
|
linkEnd = i
|
||||||
if data[linkOffset] == '<' && data[linkEnd-1] == '>' {
|
if data[linkOffset] == '<' && data[linkEnd-1] == '>' {
|
||||||
linkOffset++
|
linkOffset++
|
||||||
|
Loading…
Reference in New Issue
Block a user