fix RST parsing when no indent after enum.item (fix #17249) (#17257)

This commit is contained in:
Andrey Makarov 2021-03-12 10:33:21 +03:00 • committed by GitHub
commit d97bf4f1c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 82 additions and 28 deletions

View file

@ -1506,7 +1506,8 @@ proc rstToHtml*(s: string, options: RstParseOptions,
initRstGenerator(d, outHtml, config, filen, options, myFindFile,
rst.defaultMsgHandler)
var dummyHasToc = false
var rst = rstParse(s, filen, 0, 1, dummyHasToc, options)
var rst = rstParse(s, filen, line=LineRstInit, column=ColRstInit,
dummyHasToc, options)
result = ""
renderRstToOut(d, rst, result)
@ -1518,4 +1519,7 @@ proc rstToLatex*(rstSource: string; options: RstParseOptions): string {.inline,
var option: bool
var rstGenera: RstGenerator
rstGenera.initRstGenerator(outLatex, defaultConfig(), "input", options)
rstGenera.renderRstToOut(rstParse(rstSource, "", 1, 1, option, options), result)
rstGenera.renderRstToOut(
rstParse(rstSource, "", line=LineRstInit, column=ColRstInit,
option, options),
result)