follow-up #17930 - inline syntax highlighting (#18013)

* follow-up #17930 - inline syntax highlighting

* make closure->nimcall
This commit is contained in:
Andrey Makarov
2021-05-17 00:55:14 +03:00
committed by GitHub
parent d83b25db1e
commit 2096490b59
3 changed files with 57 additions and 24 deletions

View File

@@ -371,6 +371,27 @@ suite "RST inline markup":
rnLeaf '```'
""")
test "interpreted text parsing: code fragments":
check(dedent"""
.. default-role:: option
`--gc:refc`""".toAst ==
dedent"""
rnInner
rnDefaultRole
rnDirArg
rnLeaf 'option'
[nil]
[nil]
rnParagraph
rnCodeFragment
rnInner
rnLeaf '--'
rnLeaf 'gc'
rnLeaf ':'
rnLeaf 'refc'
rnLeaf 'option'
""")
test """interpreted text can be ended with \` """:
let output = (".. default-role:: literal\n" & """`\``""").toAst