rst: add support for markdown tables (#15854)

* rst: add support for markdown tables

* change template into proc

* don't create unnecessary `seq[string]`
This commit is contained in:
Miran 2020-11-10 09:41:26 +01:00 • committed by GitHub
commit ee78d76108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 116 additions and 16 deletions

View file

@ -1094,7 +1094,7 @@ proc renderRstToOut(d: PDoc, n: PRstNode, result: var string) =
of rnBlockQuote:
renderAux(d, n, "<blockquote><p>$1</p></blockquote>\n",
"\\begin{quote}$1\\end{quote}\n", result)
of rnTable, rnGridTable:
of rnTable, rnGridTable, rnMarkdownTable:
renderAux(d, n,
"<table border=\"1\" class=\"docutils\">$1</table>",
"\\begin{table}\\begin{rsttab}{" &