Files
su2026rwep/_extensions/drwater/docx-quotes/docx-quotes.lua
T
2026-05-21 13:37:53 +08:00

25 lines
547 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--- Convert straight angle quotation marks to curly quotation marks in DOCX
--- Copyright: © 2025Present Tom Ben
--- License: MIT License
function Str(el)
-- If not DOCX output, return element unchanged
if not FORMAT:match('docx') then
return el
end
local replacements = {
[''] = '',
[''] = '',
[''] = '',
[''] = ''
}
for original, replacement in pairs(replacements) do
el.text = el.text:gsub(original, replacement)
end
return el
end