Skip to content

Commit

Permalink
fix #17260 render \a properly in nim doc
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 10, 2021
1 parent 2f213db commit c6a4287
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/packages/docutils/rst.nim
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ proc isInlineMarkupEnd(p: RstParser, markup: string): bool =
if not result: return
# Rule 4:
if p.idx > 0:
if markup != "``" and prevTok(p).symbol == "\\":
# refs bug #17260
if markup notin ["``", "`"] and prevTok(p).symbol == "\\":
result = false

proc isInlineMarkupStart(p: RstParser, markup: string): bool =
Expand Down Expand Up @@ -1212,7 +1213,7 @@ proc parseInline(p: var RstParser, father: PRstNode) =
father.add(n)
elif isInlineMarkupStart(p, "`"):
var n = newRstNode(rnInterpretedText)
parseUntil(p, n, "`", true)
parseUntil(p, n, "`", false) # bug #17260
n = parsePostfix(p, n)
father.add(n)
elif isInlineMarkupStart(p, "|"):
Expand Down

0 comments on commit c6a4287

Please sign in to comment.