diff options
Diffstat (limited to 'tests/stdlib/trst.nim')
-rw-r--r-- | tests/stdlib/trst.nim | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/stdlib/trst.nim b/tests/stdlib/trst.nim index 70d992166..d1d7a3f00 100644 --- a/tests/stdlib/trst.nim +++ b/tests/stdlib/trst.nim @@ -576,6 +576,45 @@ suite "RST parsing": # | | # | \ indentation of exactly two spaces before 'let a = 1' + test "no blank line is required before or after Markdown code block": + let inputBacktick = dedent""" + Some text + ``` + CodeBlock() + ``` + Other text""" + let inputTilde = dedent""" + Some text + ~~~~~~~~~ + CodeBlock() + ~~~~~~~~~ + Other text""" + let expected = dedent""" + rnInner + rnParagraph + rnLeaf 'Some' + rnLeaf ' ' + rnLeaf 'text' + rnParagraph + rnCodeBlock + [nil] + rnFieldList + rnField + rnFieldName + rnLeaf 'default-language' + rnFieldBody + rnLeaf 'Nim' + rnLiteralBlock + rnLeaf ' + CodeBlock()' + rnLeaf ' ' + rnLeaf 'Other' + rnLeaf ' ' + rnLeaf 'text' + """ + check inputBacktick.toAst == expected + check inputTilde.toAst == expected + test "option list has priority over definition list": check(dedent""" --defusages |