Module:Nowiki parameter/doc

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
This is the documentation subpage of Module:Nowiki parameter. It contains usage information that is not part of the underlying module.

This module is a single function which is used to unwrap parameters a template expects to be wrapped in a <nowiki> tag. For use in the implementation of other modules.

local nowikiParameter = require("Module:Nowiki parameter")

Used as:

function p.main(frame)
    local value, usedNowiki = nowikiParameter(frame.args[1])
    -- do stuff with value
end

Parameters

  1. A value read from frame.args. Expected to be a string or nil.

Returns

  1. The raw text wrapped by the nowiki tag. If the input
  2. A boolean that indicates whether the input was in fact wrapped in a <nowiki> tag. This can be used by templates which require input to be wrapped, to display an error to the user if unwrapped text or any other type of input was given to the parameter.