Add another test for footnote definitions.

This commit is contained in:
Tom Alexander
2023-10-29 16:14:34 -04:00
parent 3720558d93
commit ba511b7f9e
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# This test shows that footnote references only count if the definition containing them is rendered.
foo[fn:a:bar]
[fn:a] lorem
[fn:b] ipsum
[fn:d] fizz
[fn:c] dolar
yo[fn:b]
hello[fn:c]
[fn:e] buzz
sup[fn:d]

View File

@@ -0,0 +1,25 @@
# Test proves that:
#
# - Anonymous references with identical content get unique IDs.
# - Unreferenced footnote definitions are dropped.
# - Footnote definitions that come before their first reference are dropped.
foo[fn:2:something]
bar[fn::something]
baz[fn::something]
cat[fn::something]
dog[fn:3]
[fn:3] ipsum
[fn:4] lorem
[fn:3] dolar
[fn:5] not referenced
stuff[fn:4] and things