RST tables: fix latex col number; allow less than three of = (#16040)

This commit is contained in:
Andrey Makarov 2020-12-04 10:50:17 +03:00 • committed by GitHub
commit 6877e0c8a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 263 additions and 31 deletions

View file

@ -1009,7 +1009,8 @@ proc renderContainer(d: PDoc, n: PRstNode, result: var string) =
proc texColumns(n: PRstNode): string =
result = ""
for i in countup(1, len(n)): add(result, "|X")
let nColumns = if n.sons.len > 0: len(n.sons[0]) else: 1
for i in countup(1, nColumns): add(result, "|X")
proc renderField(d: PDoc, n: PRstNode, result: var string) =
var b = false