Skip to content

Commit

Permalink
Fixes #34
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Nov 24, 2019
1 parent 9dec7e9 commit fba5de7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions parser/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ var linkBottom = NewContextKey()

func (s *linkParser) Parse(parent ast.Node, block text.Reader, pc Context) ast.Node {
line, segment := block.PeekLine()
if line[0] == '!' && len(line) > 1 && line[1] == '[' {
block.Advance(1)
pc.Set(linkBottom, pc.LastDelimiter())
return processLinkLabelOpen(block, segment.Start+1, true, pc)
if line[0] == '!' {
if len(line) > 1 && line[1] == '[' {
block.Advance(1)
pc.Set(linkBottom, pc.LastDelimiter())
return processLinkLabelOpen(block, segment.Start+1, true, pc)
}
return nil
}
if line[0] == '[' {
pc.Set(linkBottom, pc.LastDelimiter())
Expand Down

0 comments on commit fba5de7

Please sign in to comment.