mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD053/link-image-reference-definitions to handle references within references (i.e., Pandoc-style footnotes), verify Pandoc footnote indent is not treated as comment when markdown-it-footnote plugin is used (fixes #599).
This commit is contained in:
parent
7d1fa55cc4
commit
592a42b0cb
8 changed files with 169 additions and 2 deletions
47
test/pandoc-footnotes.md
Normal file
47
test/pandoc-footnotes.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Pandoc Footnotes
|
||||
|
||||
> Examples taken from [GitHub issue 599](https://github.com/DavidAnson/markdownlint/issues/599)
|
||||
|
||||
## Example with Pandoc Footnotes
|
||||
|
||||
A sentence with footnotes: [^1] [^2]
|
||||
A sentence with named footnotes: [^name] [^name2]
|
||||
A sentence with a link reference: [Pandoc's User Guide][Pandoc1]
|
||||
|
||||
[^1]: I am a footnote!
|
||||
[^2]: I reference a [PCW][PCW1] article!
|
||||
[^name]: I am a footnote with name!
|
||||
[^name2]: I am also a named footnote! I also reference the [PCW][PCW1] article!
|
||||
|
||||
[PCW1]: https://www.example.com/article.html
|
||||
[Pandoc1]: https://pandoc.org/MANUAL.html#extension-footnotes
|
||||
|
||||
## Example with Long Pandoc Footnotes
|
||||
|
||||
A sentence with a long footnotes: [^long] [^longer] [^longest]
|
||||
|
||||
[^long]: I am a long footnote!
|
||||
I don't do any harm :)
|
||||
[^longer]: I am a longer footnote. I do reference the [PCW][PCW2] article.
|
||||
I do harm. Though, not here: [Pandoc's User Guide][Pandoc2]
|
||||
[^longest]: I am the longest footnote. I also reference the [PCW][PCW2] article.
|
||||
|
||||
I am a harmful new block of text: [Another][Another2]
|
||||
|
||||
> The previous line of text is treated by CommonMark as an indented code block.
|
||||
> To handle it as a Pandoc footnote, consider the `markdown-it-footnote` plugin.
|
||||
|
||||
[PCW2]: https://www.example.com/article.html
|
||||
[Pandoc2]: https://pandoc.org/MANUAL.html#extension-footnotes
|
||||
[Another2]: https://www.example.com/another.{MD053}.html
|
||||
|
||||
## GitHub Footnotes
|
||||
|
||||
Sample footnotes [^3] [^note3]
|
||||
|
||||
[^3]: A line
|
||||
A new line
|
||||
|
||||
[^note3]:
|
||||
I am a new block of text
|
||||
With a new line as well
|
||||
Loading…
Add table
Add a link
Reference in a new issue