diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2022-09-09 17:45:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 10:45:54 -0400 |
commit | f6ee066ee2576757bd21071e046c9228bbb57552 (patch) | |
tree | 5e7374b512fb375a2db871fcc490fa1d28b562c9 /tests | |
parent | 89e6540fd3a924c387defe2bf7648ebc653c2418 (diff) | |
download | Nim-f6ee066ee2576757bd21071e046c9228bbb57552.tar.gz |
Markdown links migration part 1 (#20319)
Markdown link migration part 1 Also the warning is improved a bit. Local links (targeting inside its document) which had had a full anchor were turned into concise form. The very fact that they existed may be due to the bug in reference to subsections fixed https://github.com/nim-lang/Nim/pull/20279, now they are working well (both in RST syntax and new Pandoc Markdown syntax implemented in https://github.com/nim-lang/Nim/pull/20304)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/trst.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib/trst.nim b/tests/stdlib/trst.nim index 0b6cbc071..f9150e02d 100644 --- a/tests/stdlib/trst.nim +++ b/tests/stdlib/trst.nim @@ -1181,6 +1181,22 @@ suite "Warnings": "input(9, 6) Warning: broken link 'short.link'" ]) + test "Pandoc Markdown concise link warning points to target": + var warnings = new seq[string] + check( + "ref [here][target]".toAst(warnings=warnings) == + dedent""" + rnInner + rnLeaf 'ref' + rnLeaf ' ' + rnPandocRef + rnInner + rnLeaf 'here' + rnInner + rnLeaf 'target' + """) + check warnings[] == @["input(1, 12) Warning: broken link 'target'"] + test "With include directive and blank lines at the beginning": "other.rst".writeFile(dedent""" |