summary refs log tree commit diff stats
path: root/tests/stdlib/trstgen.nim
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2021-04-15 09:12:44 +0300
committerGitHub <noreply@github.com>2021-04-15 08:12:44 +0200
commitf8dce493d36c10bfdfb3bd4ac87eae7b96b97f1a (patch)
tree0b7408e8b11eda880ed55d67b3caae7f7205a977 /tests/stdlib/trstgen.nim
parentae9231cfebf800886c4febcf0fc7ccc380066108 (diff)
downloadNim-f8dce493d36c10bfdfb3bd4ac87eae7b96b97f1a.tar.gz
rst indentation fixes (ref #17340) (#17715)
Diffstat (limited to 'tests/stdlib/trstgen.nim')
-rw-r--r--tests/stdlib/trstgen.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/stdlib/trstgen.nim b/tests/stdlib/trstgen.nim
index ed5d72226..29747f4e8 100644
--- a/tests/stdlib/trstgen.nim
+++ b/tests/stdlib/trstgen.nim
@@ -1118,6 +1118,17 @@ Test1
       """
     check "<pre class=\"line-nums\">55\n56\n</pre>" in input.toHtml
 
+  test "Nim code-block indentation":
+    let input = dedent """
+      .. code-block:: nim
+        :number-lines: 55
+
+       x
+      """
+    let output = input.toHtml
+    check "<pre class=\"line-nums\">55\n</pre>" in output
+    check "<span class=\"Identifier\">x</span>" in output
+
   test "RST admonitions":
     # check that all admonitions are implemented
     let input0 = dedent """
@@ -1466,7 +1477,7 @@ Test1
             """<table class="docinfo" frame="void" rules="none">""" &
             """<col class="docinfo-name" /><col class="docinfo-content" />""" &
             """<tbody valign="top"><tr><th class="docinfo-name">field:</th>""" &
-            """<td> text</td></tr>""" & "\n</tbody></table>")
+            """<td>text</td></tr>""" & "\n</tbody></table>")
 
   test "Field list: body after newline":
     let output = dedent """