Documentation for this module may be created at Module:Book appearances/doc
-- local string = require("Module:String")
local p = {}
local abbrs = {
["TDP"] = "The Dragonet Prophecy",
["TLH"] = "The Lost Heir",
["THK"] = "The Hidden Kingdom",
["TDS"] = "The Dark Secret",
["TBN"] = "The Brightest Night",
}
function p.generate_appearances_list(str, delim)
delim = delim or '\n'
local res = '';
for abbr in mw.text.gsplit(str, ' ', true) do
local full = abbrs[abbr]
if full then
res = res .. full .. delim
else
return '{{error|Unrecognized abbreviation <code>' .. abbr .. '</code>}}'
end
end
return res
end
return p