aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-09-16 12:44:52 +0200
committerJohn MacFarlane <[email protected]>2025-09-16 12:46:25 +0200
commitcf760c7f66bfa3eb5530d83b878fcb611453ab5e (patch)
tree6fcf22f7cf716b5164920d8eddf5d741ed510605 /test
parentc3a5513eedf4fbfb135419b2ffa85c81f6521e2b (diff)
Markdown reader: Improve superscript/subscript/inline note parsing.
We do not allow inline notes to be followed by `(` or `[`. Otherwise, we parse inline notes before superscripts. This fixes #8652. Also, the sub/superscript parsers have been adjusted so that they really exclude unescaped spaces (as they did not before, when the spaces occurred in nested inlines). See #5878 for comment.
Diffstat (limited to 'test')
-rw-r--r--test/command/8652.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/command/8652.md b/test/command/8652.md
new file mode 100644
index 000000000..e98f1cdec
--- /dev/null
+++ b/test/command/8652.md
@@ -0,0 +1,28 @@
+```
+% pandoc -t native
+My text^[My note]isnot^[Text]
+^D
+[ Para
+ [ Str "My"
+ , Space
+ , Str "text"
+ , Note [ Para [ Str "My" , Space , Str "note" ] ]
+ , Str "isnot"
+ , Note [ Para [ Str "Text" ] ]
+ ]
+]
+
+```
+
+```
+% pandoc -t native
+^[note1]test^[note2]
+^D
+[ Para
+ [ Note [ Para [ Str "note1" ] ]
+ , Str "test"
+ , Note [ Para [ Str "note2" ] ]
+ ]
+]
+
+```