Skip to content

Commit

Permalink
Issue #4: Fix invalid leading spaces with attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed May 15, 2019
1 parent e59897f commit 6703518
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parser/atx_heading.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func (b *atxHeadingParser) Open(parent ast.Node, reader text.Reader, pc Context)
node := ast.NewHeading(level)
parsed := false
if b.Attribute { // handles special case like ### heading ### {#id}
start--
if line[start] == '#' {
start--
}
closureOpen := -1
closureClose := -1
for i := start; i < stop; {
Expand Down

0 comments on commit 6703518

Please sign in to comment.