mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Merge pull request #102 from jsteuer/master
Allow inline links with empty link text
This commit is contained in:
commit
4a200405d7
2 changed files with 18 additions and 5 deletions
|
|
@ -76,3 +76,21 @@ place where everything breaks")
|
|||
place where everything breaks">This link won't be rendered
|
||||
correctly</a></p>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
||||
|
||||
|
||||
7
|
||||
//- - - - - - - - -//
|
||||
[](./target.md)
|
||||
//- - - - - - - - -//
|
||||
<p><a href="./target.md"></a></p>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
||||
|
||||
|
||||
8
|
||||
//- - - - - - - - -//
|
||||
[]()
|
||||
//- - - - - - - - -//
|
||||
<p><a href=""></a></p>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
|
@ -147,11 +147,6 @@ func (s *linkParser) Parse(parent ast.Node, block text.Reader, pc Context) ast.N
|
|||
ast.MergeOrReplaceTextSegment(last.Parent(), last, last.Segment)
|
||||
return nil
|
||||
}
|
||||
labelValue := block.Value(text.NewSegment(last.Segment.Start+1, segment.Start))
|
||||
if util.IsBlank(labelValue) && !last.IsImage {
|
||||
ast.MergeOrReplaceTextSegment(last.Parent(), last, last.Segment)
|
||||
return nil
|
||||
}
|
||||
|
||||
c := block.Peek()
|
||||
l, pos := block.Position()
|
||||
|
|
|
|||
Loading…
Reference in a new issue