pull/691/merge
Javi Fontan 2021-09-30 11:54:37 +02:00 committed by GitHub
commit 9d6ea1bc6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1360,7 +1360,7 @@ gatherlines:
if *flags&ListTypeDefinition != 0 && i < len(data)-1 {
// is the next item still a part of this list?
next := i
for next < len(data) && data[next] != '\n' {
for next < len(data)-1 && data[next] != '\n' {
next++
}
for next < len(data)-1 && data[next] == '\n' {

View File

@ -34,6 +34,10 @@ func TestDocument(t *testing.T) {
// https://github.com/russross/blackfriday/issues/173
" [",
"<p>[</p>\n",
// This should't panic.
"text\n\n:item: **text**\ntext\n",
"<dl>\n<dt>text</dt>\n</dl>\n\n<p>:item: <strong>text</strong>\ntext</p>\n",
}
doTests(t, tests)
}