This commit is contained in:
yuin 2021-10-16 19:55:09 +09:00
parent 20a276ea45
commit cbaee30aee
2 changed files with 29 additions and 2 deletions

View file

@ -526,3 +526,30 @@ _a[b_c_](d)
<p>&lt;a\f&gt;</p>
<p>&lt; p&gt;</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
41: Link references can not contain spaces after link label
//- - - - - - - - -//
[x]
:>
[o] :x
//- - - - - - - - -//
<p>[x]
:&gt;</p>
<p>[o] :x</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
42: Unclosed link reference titles can interrupt link references
//- - - - - - - - -//
[r]:
<>
'
[o]:
x
'
//- - - - - - - - -//
<p>'</p>
<p>'</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -84,7 +84,6 @@ func parseLinkReferenceDefinition(block text.Reader, pc Context) (int, int) {
if util.IsBlank(label) {
return -1, -1
}
block.SkipSpaces()
if block.Peek() != ':' {
return -1, -1
}
@ -123,7 +122,8 @@ func parseLinkReferenceDefinition(block text.Reader, pc Context) (int, int) {
}
ref := NewReference(label, destination, nil)
pc.AddReference(ref)
return startLine, endLine
block.AdvanceLine()
return startLine, endLine + 1
}
var title []byte
if segments.Len() == 1 {