From db9be758bc170e01cc0ce3af43a818edab8ea15f Mon Sep 17 00:00:00 2001 From: benniekiss <63211101+benniekiss@users.noreply.github.com> Date: Sun, 14 Dec 2025 10:44:56 -0500 Subject: Markdown reader: fix parsing of inline math (`$...$`) (#11348) Do not allow blank lines before closing `$` delimiter. This brings the parser in line with the documentation. Closes #11311. --- test/command/11348.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 test/command/11348.md (limited to 'test/command') diff --git a/test/command/11348.md b/test/command/11348.md new file mode 100644 index 000000000..1871808fe --- /dev/null +++ b/test/command/11348.md @@ -0,0 +1,61 @@ +``` +% pandoc -f markdown -t native +$ invalid opening inline math$ + +$ +invalid opening inline math$ + +$invalid closing inline math $ + +$invalid closing inline math +$ + +$valid inline math$ +^D +[ Para + [ Str "$" + , Space + , Str "invalid" + , Space + , Str "opening" + , Space + , Str "inline" + , Space + , Str "math$" + ] +, Para + [ Str "$" + , SoftBreak + , Str "invalid" + , Space + , Str "opening" + , Space + , Str "inline" + , Space + , Str "math$" + ] +, Para + [ Str "$invalid" + , Space + , Str "closing" + , Space + , Str "inline" + , Space + , Str "math" + , Space + , Str "$" + ] +, Para + [ Str "$invalid" + , Space + , Str "closing" + , Space + , Str "inline" + , Space + , Str "math" + , SoftBreak + , Str "$" + ] +, Para [ Math InlineMath "valid inline math" ] +] +``` -- cgit v1.2.3