fix #17260 render \ properly in nim doc, rst2html (#17315)

This commit is contained in:
Timothee Cour 2021-03-24 02:58:29 -07:00 • committed by GitHub
commit 1590d14575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 10 deletions

View file

@ -2827,7 +2827,7 @@ when declared(initDebugger):
proc addEscapedChar*(s: var string, c: char) {.noSideEffect, inline.} =
## Adds a char to string `s` and applies the following escaping:
##
## * replaces any `\` by `\\`
## * replaces any ``\`` by `\\`
## * replaces any `'` by `\'`
## * replaces any `"` by `\"`
## * replaces any `\a` by `\\a`
@ -2838,7 +2838,7 @@ proc addEscapedChar*(s: var string, c: char) {.noSideEffect, inline.} =
## * replaces any `\f` by `\\f`
## * replaces any `\r` by `\\r`
## * replaces any `\e` by `\\e`
## * replaces any other character not in the set `{'\21..'\126'}
## * replaces any other character not in the set `{\21..\126}`
## by `\xHH` where `HH` is its hexadecimal value.
##
## The procedure has been designed so that its output is usable for many