summary refs log tree commit diff stats
path: root/tests/stdlib/trst.nim
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2021-05-17 00:55:14 +0300
committerGitHub <noreply@github.com>2021-05-16 23:55:14 +0200
commit2096490b5974cfb11d0f5d37ff6d3a963ef43713 (patch)
tree6ad64aa60d8eca1f7583f076e0421385625084bb /tests/stdlib/trst.nim
parentd83b25db1ebe7025d95dbce3978219948f5c49d3 (diff)
downloadNim-2096490b5974cfb11d0f5d37ff6d3a963ef43713.tar.gz
follow-up #17930 - inline syntax highlighting (#18013)
* follow-up #17930 - inline syntax highlighting

* make closure->nimcall
Diffstat (limited to 'tests/stdlib/trst.nim')
-rw-r--r--tests/stdlib/trst.nim21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/stdlib/trst.nim b/tests/stdlib/trst.nim
index e6c5d9700..71f5a858b 100644
--- a/tests/stdlib/trst.nim
+++ b/tests/stdlib/trst.nim
@@ -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