Add tests for self-references
Note as there is no support for block references at the moment, the generated link goes nowhere, however it is to a reasonable ID
This commit is contained in:
parent
9418f20d61
commit
60d41672a5
7
tests/testdata/expected/main-samples/section-ref-a.md
vendored
Normal file
7
tests/testdata/expected/main-samples/section-ref-a.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[This is a header](section-ref-a.md#this-is-a-header)
|
||||||
|
|
||||||
|
[^dda637](section-ref-a.md#dda637)
|
||||||
|
|
||||||
|
## This is a header
|
||||||
|
|
||||||
|
This is a block ^dda637
|
2
tests/testdata/expected/main-samples/section-ref-b.md
vendored
Normal file
2
tests/testdata/expected/main-samples/section-ref-b.md
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[section-ref-a > This is a header](section-ref-a.md#this-is-a-header)
|
||||||
|
[section-ref-a > ^dda637](section-ref-a.md#dda637)
|
7
tests/testdata/input/main-samples/section-ref-a.md
vendored
Normal file
7
tests/testdata/input/main-samples/section-ref-a.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[[#This is a header]]
|
||||||
|
|
||||||
|
[[#^dda637]]
|
||||||
|
|
||||||
|
## This is a header
|
||||||
|
|
||||||
|
This is a block ^dda637
|
2
tests/testdata/input/main-samples/section-ref-b.md
vendored
Normal file
2
tests/testdata/input/main-samples/section-ref-b.md
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[[section-ref-a#This is a header]]
|
||||||
|
[[section-ref-a#^dda637]]
|
Loading…
Reference in New Issue
Block a user