Skip to content

Commit

Permalink
fix nim-lang#14474, crash inside of a sole code-block (nim-lang#15402)
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran authored and mildred committed Jan 11, 2021
1 parent afc812a commit 0ced2c2
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 0ced2c2

Please sign in to comment.