Markdown code blocks part 2; migrate Nim Manual (#20080)
* Change headings underscored by `~~~` to `###` * Markdown code blocks part 2; migrate Nim Manual
This commit is contained in:
parent
685bf944aa
commit
62b81d7f10
7 changed files with 881 additions and 670 deletions
|
|
@ -471,21 +471,34 @@ suite "RST parsing":
|
|||
rnLeaf '.'
|
||||
""")
|
||||
|
||||
let expectCodeBlock = dedent"""
|
||||
rnCodeBlock
|
||||
[nil]
|
||||
[nil]
|
||||
rnLiteralBlock
|
||||
rnLeaf '
|
||||
let a = 1
|
||||
```'
|
||||
"""
|
||||
|
||||
test "Markdown code blocks with more > 3 backticks":
|
||||
check(dedent"""
|
||||
````
|
||||
let a = 1
|
||||
```
|
||||
````""".toAst ==
|
||||
dedent"""
|
||||
rnCodeBlock
|
||||
[nil]
|
||||
[nil]
|
||||
rnLiteralBlock
|
||||
rnLeaf '
|
||||
````""".toAst == expectCodeBlock)
|
||||
|
||||
test "Markdown code blocks with ~~~":
|
||||
check(dedent"""
|
||||
~~~
|
||||
let a = 1
|
||||
```'
|
||||
""")
|
||||
```
|
||||
~~~""".toAst == expectCodeBlock)
|
||||
check(dedent"""
|
||||
~~~~~
|
||||
let a = 1
|
||||
```
|
||||
~~~~~""".toAst == expectCodeBlock)
|
||||
|
||||
test "Markdown code blocks with Nim-specific arguments":
|
||||
check(dedent"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue