diff options
Diffstat (limited to 'vendor/github.com/yuin/goldmark/parser/atx_heading.go')
-rw-r--r-- | vendor/github.com/yuin/goldmark/parser/atx_heading.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/yuin/goldmark/parser/atx_heading.go b/vendor/github.com/yuin/goldmark/parser/atx_heading.go index 0b63fabc0b..2526088819 100644 --- a/vendor/github.com/yuin/goldmark/parser/atx_heading.go +++ b/vendor/github.com/yuin/goldmark/parser/atx_heading.go @@ -126,7 +126,8 @@ func (b *atxHeadingParser) Open(parent ast.Node, reader text.Reader, pc Context) if closureClose > 0 { reader.Advance(closureClose) attrs, ok := ParseAttributes(reader) - parsed = ok + rest, _ := reader.PeekLine() + parsed = ok && util.IsBlank(rest) if parsed { for _, attr := range attrs { node.SetAttribute(attr.Name, attr.Value) @@ -232,7 +233,7 @@ func parseLastLineAttributes(node ast.Node, reader text.Reader, pc Context) { } lr.Advance(1) } - if ok && util.IsBlank(line[end.Stop:]) { + if ok && util.IsBlank(line[end.Start:]) { for _, attr := range attrs { node.SetAttribute(attr.Name, attr.Value) } |