Module:Lore

-- local p = {}

local data = require("Module:Lore/Data") local all_lore = data.lore

function p.Lore(frame) local name = frame.args[1] or mw.title.getCurrentTitle.text local desc = all_lore[name].Desc desc = desc:gsub("([^\\][^r])\n", "%1\r\n"):gsub("^\r\n", ""):gsub("^%s*(.-)%s*$", "%1"):gsub("", ""):gsub("<\/style>", " "):gsub("\u(%x%x%x%x)", function(s) return mw.ustring.char(tonumber(s, 16)) end) local pre = mw.html.create("pre"):addClass("lore"):wikitext(desc) return pre:done end

return p --