Module:Template link general: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(poking with the mw.html....)
m ((confused look))
Line 50: Line 50:
if not _ne(textPart) then
if not _ne(textPart) then
if titleObj ~= nil then
if titleObj ~= nil then
textPart = titleObj.ns == 10 and titleObj.text or titleObj.fullText
textPart = titleObj.ns == 10 and args['1'] or titleObj.fullText
else
else
-- redlink
-- redlink
Line 114: Line 114:
if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end
if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end
-- Wrap as html
-- Wrap as html??
local span = mw.html.create('span')
local span = mw.html.create('span')
span:wikitext(ret)
span:wikitext(ret)
return span
return ret
end
end