RST: improve simple tables (#19859)

* RST: improve simple tables

* nim 1.0 gotchas

* Still allow legacy boundaries like `----`
This commit is contained in:
Andrey Makarov 2022-06-04 08:03:03 +03:00 • committed by GitHub
commit 4341b06f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 487 additions and 120 deletions

View file

@ -552,15 +552,15 @@ proc escape*(s: string): string =
##
## Escapes these characters:
##
## ------------ -------------------
## ============ ===================
## char is converted to
## ------------ -------------------
## ============ ===================
## ``<`` ``&lt;``
## ``>`` ``&gt;``
## ``&`` ``&amp;``
## ``"`` ``&quot;``
## ``'`` ``&apos;``
## ------------ -------------------
## ============ ===================
##
## You can also use `addEscaped proc <#addEscaped,string,string>`_.
result = newStringOfCap(s.len)