Module:Data to Table: Difference between revisions
ReisuDesign (talk | contribs) No edit summary |
ReisuDesign (talk | contribs) No edit summary |
||
| Line 16: | Line 16: | ||
-- Escape characters | -- Escape characters | ||
local function clean(txt) | local function clean(txt) | ||
txt | return txt | ||
:gsub('\ | :gsub('\\', '\\\\') | ||
:gsub('\'', '\\\'') | :gsub('\'', '\\\'') | ||
end | end | ||
| Line 177: | Line 175: | ||
-- Wrap output in syntaxhighlight | -- Wrap output in syntaxhighlight | ||
local luaText = tostring(result) | |||
-- Decode HTML entities introduced by mw.html | |||
luaText = mw.text.decode(luaText) | |||
local output = frame:extensionTag( | local output = frame:extensionTag( | ||
'syntaxhighlight', | 'syntaxhighlight', | ||
luaText, | |||
{ | { | ||
lang = 'lua', | lang = 'lua', | ||
copy = '' | copy = '' | ||
} | } | ||
) | |||