diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-11 00:56:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 18:56:01 +0200 |
commit | e290b028aba9fd50a69ed8c0346ee323f9287a13 (patch) | |
tree | 5803e324eb15d6f74cd5a21b593983e2002cdaa8 /tests/stdlib | |
parent | 1f2075042b7feb06cffe6c4ae6562a2e38144f81 (diff) | |
download | Nim-e290b028aba9fd50a69ed8c0346ee323f9287a13.tar.gz |
Make rstgen work with gcsafe (#20534)
* Make rstgen work with gcsafe Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> * add tests and fixes * if nimHasWarningAsError Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/trstgen.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stdlib/trstgen.nim b/tests/stdlib/trstgen.nim index a25d903db..8c07b35f0 100644 --- a/tests/stdlib/trstgen.nim +++ b/tests/stdlib/trstgen.nim @@ -1684,3 +1684,8 @@ suite "local file inclusion": discard "```nim file = ./readme.md\n```".toHtml(error=error) check(error[] == "input(1, 23) Error: disabled directive: 'file'") +proc documentToHtml*(doc: string, isMarkdown: bool = false): string {.gcsafe.} = + var options = {roSupportMarkdown} + if isMarkdown: + options.incl roPreferMarkdown + result = rstToHtml(doc, options, defaultConfig()) |