Module:Sandbox/Erutuon/charinsert names: Difference between revisions

Content deleted Content added
all codepoints, shorter lines
highlight
Line 29:
return "{" .. table.concat(JSON, ",") .. "}"
end
 
-- copied from [[wikt:Module:debug]]
function p.highlight(content, options)
if type(content) == "table" then
options = content
options = {
lang = options.lang or "lua",
inline = options.inline and true
}
return function(content)
return mw.getCurrentFrame():extensionTag{
name = "syntaxhighlight",
content = content,
args = options
}
end
else
return mw.getCurrentFrame():extensionTag{
name = "syntaxhighlight",
content = content,
args = {
lang = options and options.lang or "lua",
inline = options and options.inline and true or nil
}
}
end
end
 
Line 37 ⟶ 64:
if not charinsert then return "Could not find charinsert" end
return p.highlight(p.JSON_character_names(charinsert))
end