validate rst field for :number-lines:, :status: (#18304)

This commit is contained in:
Andrey Makarov 2021-06-20 21:00:42 +03:00 • committed by GitHub
commit 1b3c0f142d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 8 deletions

View file

@ -1136,6 +1136,18 @@ Test1
check "<pre class=\"line-nums\">55\n</pre>" in output
check "<span class=\"Identifier\">x</span>" in output
test "Nim code-block indentation":
let input = dedent """
.. code-block:: nim
:number-lines: 55
let a = 1
"""
var error = new string
let output = input.toHtml(error=error)
check(error[] == "input(1, 1) Error: invalid field: " &
"extra arguments were given to number-lines: ' let a = 1'")
check "" == output
test "RST admonitions":
# check that all admonitions are implemented
let input0 = dedent """