fix #14474, crash inside of a sole code-block (#15402)

This commit is contained in:
Miran 2020-09-24 16:41:08 +02:00 • committed by GitHub
commit 496e9f74e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1102,6 +1102,8 @@ proc whichSection(p: RstParser): RstNodeKind =
of tkPunct:
if isMarkdownHeadline(p):
result = rnHeadline
elif p.tok[p.idx].symbol == "```":
result = rnCodeBlock
elif match(p, tokenAfterNewline(p), "ai"):
result = rnHeadline
elif p.tok[p.idx].symbol == "::":