rm redundant blank lines before literal blocks (#18465)
This commit is contained in:
parent
0d74f60742
commit
0e44d137f9
4 changed files with 23 additions and 12 deletions
|
|
@ -1762,7 +1762,7 @@ proc parseLiteralBlock(p: var RstParser): PRstNode =
|
|||
var n = newLeaf("")
|
||||
if currentTok(p).kind == tkIndent:
|
||||
var indent = currentTok(p).ival
|
||||
inc p.idx
|
||||
while currentTok(p).kind == tkIndent: inc p.idx # skip blank lines
|
||||
while true:
|
||||
case currentTok(p).kind
|
||||
of tkEof:
|
||||
|
|
|
|||
|
|
@ -1258,7 +1258,7 @@ proc renderRstToOut(d: PDoc, n: PRstNode, result: var string) =
|
|||
doAssert false, "renderRstToOut"
|
||||
of rnLiteralBlock:
|
||||
renderAux(d, n, "<pre$2>$1</pre>\n",
|
||||
"\n\n\\begin{rstpre}\n$2\n$1\n\\end{rstpre}\n\n", result)
|
||||
"\n\n$2\\begin{rstpre}\n$1\n\\end{rstpre}\n\n", result)
|
||||
of rnQuotedLiteralBlock:
|
||||
doAssert false, "renderRstToOut"
|
||||
of rnLineBlock:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue