Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/resources/pandoc/datadir/lpegshortcode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,13 @@ local function string_to_hex(str)
end

local md_shortcode_2_uuid = "b58fc729-690b-4000-b19f-365a4093b2ff"
local md_shortcode_2_uuid_pattern = "b58fc729%-690b%-4000%-b19f%-365a4093b2ff%-"
local md_shortcode_2_uuid_pattern = "b58fc729%-690b%-4000%-b19f%-365a4093b2ff;"
local function md_escaped_shortcode_2_fun(s)
return table.concat({
md_shortcode_2_uuid,
"-",
";",
string_to_hex("{{{<" .. s .. ">}}}"),
"-"
";"
})
end

Expand All @@ -340,9 +340,9 @@ local function md_shortcode_2_fun(open, space, lst, close)
raw = raw .. close
return table.concat({
md_shortcode_2_uuid,
"-",
";",
string_to_hex(raw),
"-"
";"
});
end

Expand Down
2 changes: 1 addition & 1 deletion src/resources/pandoc/datadir/readqmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ local function hex_to_string(hex)
end

local function readqmd(txt, opts)
local uuid_pattern = "b58fc729%-690b%-4000%-b19f%-365a4093b2ff%-([A-Fa-f0-9]+)%-"
local uuid_pattern = "b58fc729%-690b%-4000%-b19f%-365a4093b2ff;([A-Fa-f0-9]+);"
local tags
txt = md_fenced_div.attempt_to_fix_fenced_div(txt)
txt, tags = escape_invalid_tags(txt)
Expand Down
2 changes: 2 additions & 0 deletions tests/docs/shortcodes/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.quarto/

**/*.quarto_ipynb
19 changes: 19 additions & 0 deletions tests/docs/smoke-all/2026/01/19/13913.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Shortcode with trailing punctuation
format: html
_quarto:
tests:
html:
ensureFileRegexMatches:
-
- '<p>Normal shortcode: [0-9]+\.[0-9]+\.[0-9]+</p>'
- '<p>Shortcode with trailing dash: [0-9]+\.[0-9]+\.[0-9]+-</p>'
- '<p>Shortcode with trailing semicolon: [0-9]+\.[0-9]+\.[0-9]+;suffix</p>'
- []
---

Normal shortcode: {{< version >}}

Shortcode with trailing dash: {{< version >}}-

Shortcode with trailing semicolon: {{< version >}};suffix
Loading