Module:Sandbox/Aurelain/Link

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 16:58, 25 August 2026 by Aurelain (talk | contribs) (Created page with "-- Usage: see Module:Link/doc local p = {} -- Displays a variable ------------------------------------------------------------------------------------------------------------------------ local function dump(target) return '<pre>' .. mw.dumpObject(target) .. '</pre>' end ------------------------------------------------------------------------------------------------------------------------ function p.clean(frame) local text = frame.args[1] return text end r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This module is intended as a supporting muscle for the LinkIcon template.

clean()

Removes the following words from a text:

  • Basic 
  • Advanced 
  • Expert 
  • _special
  • Masterful 

Afterwords, appends a language code, if provided and necessary.

Input:

{{#invoke:Sandbox/Aurelain/Link|clean
|Lorem,Basic ,Advanced ,Expert ,_special,Masterful ,Ipsum
}}

Output: Lorem,Basic ,Advanced ,Expert ,_special,Masterful ,Ipsum


-- Usage: see Module:Link/doc
local p = {}

-- Displays a variable
------------------------------------------------------------------------------------------------------------------------
local function dump(target)
    return '<pre>' .. mw.dumpObject(target) .. '</pre>'
end

------------------------------------------------------------------------------------------------------------------------
function p.clean(frame)
    local text = frame.args[1]
    return text
end

return p