parse RST headings when EOF follows them (#17014)

This commit is contained in:
Andrey Makarov
2021-02-12 17:08:09 +03:00
committed by GitHub
parent 66bf9b18b0
commit 8053ccde2f
2 changed files with 12 additions and 3 deletions

View File

@@ -271,6 +271,13 @@ Some chapter
let output5 = rstToHtml(input5, {roSupportMarkdown}, defaultConfig())
doAssert "&quot;punctuation symbols&quot;" in output5 and "<h1" in output5
# check that EOF after adornment does not prevent it parsing as heading
let input6 = dedent """
Some chapter
------------"""
let output6 = rstToHtml(input6, {roSupportMarkdown}, defaultConfig())
doAssert "<h1 id=\"some-chapter\">Some chapter</h1>" in output6
test "RST links":
let input1 = """