Skip to content

Commit ab6679e

Browse files
committed
be very careful around multiple-value return
1 parent 993fa6b commit ab6679e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/resources/filters/qmd-reader.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ function unescape_invalid_tags(str, tags)
104104
-- replace all lua special replacement characters with their
105105
-- escaped versions, so that when we restore the behavior,
106106
-- we don't accidentally create a pattern
107-
str = str:gsub(replacement, k:gsub("([$%%])", "%%%1"))
107+
local result = k:gsub("([$%%])", "%%%1")
108+
str = str:gsub(replacement, result)
108109
end
109110
return str
110111
end

0 commit comments

Comments
 (0)