From a302193b064875a8af8cd241985cb26574f37408 Mon Sep 17 00:00:00 2001 From: yuin Date: Sun, 19 Apr 2020 15:58:14 +0900 Subject: [PATCH] Closes #124 --- _test/options.txt | 15 +++++++++++++++ parser/atx_heading.go | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/_test/options.txt b/_test/options.txt index a90449f..99bc29c 100644 --- a/_test/options.txt +++ b/_test/options.txt @@ -45,3 +45,18 @@

records(self, zone, params={})

//= = = = = = = = = = = = = = = = = = = = = = = =// + +4 +//- - - - - - - - -// +## Test {#hey .sort,class=fine,class=shell} Doesn't matter +//- - - - - - - - -// +

Test {#hey .sort,class=fine,class=shell} Doesn't matter

+//= = = = = = = = = = = = = = = = = = = = = = = =// + + +5 +//- - - - - - - - -// +## Test ## {#hey .sort,class=fine,class=shell} Doesn't matter +//- - - - - - - - -// +

Test ## {#hey .sort,class=fine,class=shell} Doesn't matter

+//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/atx_heading.go b/parser/atx_heading.go index a631e0b..2526088 100644 --- a/parser/atx_heading.go +++ b/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)