Skip to content

Commit

Permalink
fix #14474, crash inside of a sole code-block (#15402)
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran authored Sep 24, 2020
1 parent 4ec5cba commit 496e9f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/packages/docutils/rst.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "::":
Expand Down

0 comments on commit 496e9f7

Please sign in to comment.