Rst test check messages (fix #17280) (#17338)

This commit is contained in:
Andrey Makarov 2021-03-17 22:13:04 +03:00 • committed by GitHub
commit 4bfc5a9551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 155 additions and 89 deletions

View file

@ -1476,7 +1476,8 @@ $content
# ---------- forum ---------------------------------------------------------
proc rstToHtml*(s: string, options: RstParseOptions,
config: StringTableRef): string =
config: StringTableRef,
msgHandler: MsgHandler = rst.defaultMsgHandler): string =
## Converts an input rst string into embeddable HTML.
##
## This convenience proc parses any input string using rst markup (it doesn't
@ -1503,11 +1504,10 @@ proc rstToHtml*(s: string, options: RstParseOptions,
const filen = "input"
var d: RstGenerator
initRstGenerator(d, outHtml, config, filen, options, myFindFile,
rst.defaultMsgHandler)
initRstGenerator(d, outHtml, config, filen, options, myFindFile, msgHandler)
var dummyHasToc = false
var rst = rstParse(s, filen, line=LineRstInit, column=ColRstInit,
dummyHasToc, options)
dummyHasToc, options, myFindFile, msgHandler)
result = ""
renderRstToOut(d, rst, result)