From 5e668118751b50aaf7f6ab675dd5dc628ced30bc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Oct 2023 10:27:49 -0700 Subject: Markdown reader: fix blindspot with superscript in links. Previously `[^super^](#ref)` wasn't parsed as a link, due to code that was meant to prevent footnote markers from being recognized as reference links. This commit tightens up that code to avoid this bad effect. We have also added a new restriction on footnote labels: they cannot contain the characters `^`, `[`, or `]`. Though this is technically a breaking change, we suspect that the impact will be minimal, as it's very unlikely people would be using these characters in their note labels. Closes #8981. --- test/command/8981.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/command/8981.md (limited to 'test/command') diff --git a/test/command/8981.md b/test/command/8981.md new file mode 100644 index 000000000..00ba6d231 --- /dev/null +++ b/test/command/8981.md @@ -0,0 +1,6 @@ +``` +% pandoc --wrap=none +consectetur [^\[link\]^](#ref "Title") +^D +

consectetur [link]

+``` -- cgit v1.2.3