mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fix #245 - 6
This commit is contained in:
parent
7efc483c26
commit
1306649a65
2 changed files with 10 additions and 0 deletions
|
|
@ -409,3 +409,10 @@ hello\x00world
|
||||||
<p><code>x </code></p>
|
<p><code>x </code></p>
|
||||||
<p><code> x</code></p>
|
<p><code> x</code></p>
|
||||||
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
||||||
|
28: Single # is a heading level 1
|
||||||
|
//- - - - - - - - -//
|
||||||
|
#
|
||||||
|
//- - - - - - - - -//
|
||||||
|
<h1></h1>
|
||||||
|
//= = = = = = = = = = = = = = = = = = = = = = = =//
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,9 @@ func (b *atxHeadingParser) Open(parent ast.Node, reader text.Reader, pc Context)
|
||||||
if i == pos || level > 6 {
|
if i == pos || level > 6 {
|
||||||
return nil, NoChildren
|
return nil, NoChildren
|
||||||
}
|
}
|
||||||
|
if i == len(line) { // alone '#' (without a new line character)
|
||||||
|
return ast.NewHeading(level), NoChildren
|
||||||
|
}
|
||||||
l := util.TrimLeftSpaceLength(line[i:])
|
l := util.TrimLeftSpaceLength(line[i:])
|
||||||
if l == 0 {
|
if l == 0 {
|
||||||
return nil, NoChildren
|
return nil, NoChildren
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue