Module:Non-WLH link

local linkUtil = require("Module:LinkUtil") local textUtil = require('Module:TextUtil') local p = {}

function p.nonWLHLink(link) local linkText = mw.getCurrentFrame:preprocess("") local display = linkUtil.getLinkText(link) if linkUtil.getDisplayText(link) and linkUtil.getDisplayText(link) ~= "" then display = linkUtil.getDisplayText(link) end local ret = "" if mw.getCurrentFrame:preprocess("") == linkUtil.getLinkText(link) then ret = "'''" .. display .. "'''"	else ret = "[//tardis.fandom.com/wiki/" .. linkText:gsub(' ', '_') .. " " .. display .. "] "	end return ret end

function p.nonWLHText(text) for link in string.gmatch(text, "%[%[.-%]%]") do		text = text:gsub(textUtil.escape(link), textUtil.escape(p.nonWLHLink(link))) end return text end

function p.nonWLHLinkWrapper(frame) local link = frame:getParent.args[1] return p.nonWLHLink(link) end

function p.nonWLHTextWrapper(frame) local text = frame:getParent.args[1] return p.nonWLHText(text) end

return p