mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fix #245 - 8
This commit is contained in:
parent
4317d98509
commit
457c157ed5
2 changed files with 30 additions and 2 deletions
|
|
@ -425,3 +425,25 @@ x
|
||||||
<p>x
|
<p>x
|
||||||
*</p>
|
*</p>
|
||||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
30: A link reference definition followed by a single quote without closer
|
||||||
|
//- - - - - - - - -//
|
||||||
|
[x]
|
||||||
|
|
||||||
|
[x]: <>
|
||||||
|
'
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<p><a href="">x</a></p>
|
||||||
|
<p>'</p>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
31: A link reference definition followed by a double quote without closer
|
||||||
|
//- - - - - - - - -//
|
||||||
|
[x]
|
||||||
|
|
||||||
|
[x]: <>
|
||||||
|
"
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<p><a href="">x</a></p>
|
||||||
|
<p>"</p>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ func parseLinkReferenceDefinition(block text.Reader, pc Context) (int, int) {
|
||||||
for {
|
for {
|
||||||
line, segment = block.PeekLine()
|
line, segment = block.PeekLine()
|
||||||
if line == nil {
|
if line == nil {
|
||||||
return -1, -1
|
break
|
||||||
}
|
}
|
||||||
if open < 0 {
|
if open < 0 {
|
||||||
open = segment.Start
|
open = segment.Start
|
||||||
|
|
@ -139,8 +139,14 @@ func parseLinkReferenceDefinition(block text.Reader, pc Context) (int, int) {
|
||||||
}
|
}
|
||||||
block.AdvanceLine()
|
block.AdvanceLine()
|
||||||
}
|
}
|
||||||
|
|
||||||
if closes < 0 {
|
if closes < 0 {
|
||||||
return -1, -1
|
if !isNewLine {
|
||||||
|
return -1, -1
|
||||||
|
}
|
||||||
|
ref := NewReference(label, destination, nil)
|
||||||
|
pc.AddReference(ref)
|
||||||
|
return startLine, endLine
|
||||||
}
|
}
|
||||||
|
|
||||||
line, segment = block.PeekLine()
|
line, segment = block.PeekLine()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue