Module:Delink: Difference between revisions

Created page with "-- This module de-links most wikitext. require("Module:No globals") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per Help:Pipe trick. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:ma..."
imported>Gonnym
(synced from sandbox: consistent spacing; cleaner code - if not (x == y) -> if x ~= y, etc; fix for question mark - can now delink What If...? style titles.)
 
(Created page with "-- This module de-links most wikitext. require("Module:No globals") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return s end return s:match("%[%[|(.*)%]%]") end local function delinkPipeTrick(s) -- We need to deal with colons, brackets, and commas, per Help:Pipe trick. -- First, remove the text before the first colon, if any. if s:match(":") then s = s:ma...")