mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fix #361
This commit is contained in:
parent
550b0c7ca0
commit
82ff890073
2 changed files with 14 additions and 3 deletions
|
|
@ -741,3 +741,14 @@ a <!-- b -->
|
|||
</li>
|
||||
</ol>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
||||
|
||||
58: HTML end tag without trailing new lines
|
||||
OPTIONS: {"trim": true}
|
||||
//- - - - - - - - -//
|
||||
<pre>
|
||||
</pre>
|
||||
//- - - - - - - - -//
|
||||
<pre>
|
||||
</pre>
|
||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ func (b *htmlBlockParser) Open(parent ast.Node, reader text.Reader, pc Context)
|
|||
}
|
||||
}
|
||||
if node != nil {
|
||||
reader.Advance(segment.Len() - 1)
|
||||
reader.Advance(segment.Len() - util.TrimRightSpaceLength(line))
|
||||
node.Lines().Append(segment)
|
||||
return node, NoChildren
|
||||
}
|
||||
|
|
@ -172,7 +172,7 @@ func (b *htmlBlockParser) Continue(node ast.Node, reader text.Reader, pc Context
|
|||
}
|
||||
if htmlBlockType1CloseRegexp.Match(line) {
|
||||
htmlBlock.ClosureLine = segment
|
||||
reader.Advance(segment.Len() - 1)
|
||||
reader.Advance(segment.Len() - util.TrimRightSpaceLength(line))
|
||||
return Close
|
||||
}
|
||||
case ast.HTMLBlockType2:
|
||||
|
|
@ -211,7 +211,7 @@ func (b *htmlBlockParser) Continue(node ast.Node, reader text.Reader, pc Context
|
|||
}
|
||||
}
|
||||
node.Lines().Append(segment)
|
||||
reader.Advance(segment.Len() - 1)
|
||||
reader.Advance(segment.Len() - util.TrimRightSpaceLength(line))
|
||||
return Continue | NoChildren
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue