local p =
function p.main(args) local segments = mw.loadData('Module:Sandbox/Nardog/6').segments local ret = local underlined, hasError local function endUnderline if underlined then table.insert(ret, '') underlined = false end end for i, v in ipairs(args) do local t = segments[v] if t then if t.tooltip then if not underlined then table.insert(ret, '
') underlined = true end table.insert(ret, string.format(-- Class for '%s', t.tooltip, t.text )) else endUnderline table.insert(ret, t.text) end else endUnderline table.insert(ret, string.format('[invalid input: \'%s\']', mw.text.nowiki(v) )) hasError = true end end endUnderline return table.concat(ret), hasErrorendreturn p