Module:Escape/doc: Difference between revisions

Content deleted Content added
m Module: ce
Line 48:
If provided a second argument that is a table containing a {key = value} pair, such that the key is {{code|text}}, {{code|undo}}, or {{code|kill}} and the value is a table containing the arguments that would have been passed to those functions. For example, {{code|escape:char('\\', {text {{=}} 'string'})}} is equivalent to {{code|escape:char('\\'):text('string')}}.
 
Currently,Note that if multiple key-value pairs are provided, only one may execute. It({{code|kill}} wasis plannedignored soif thateither {{code|escape:char('\\',text}} {textor {{=code|undo}} 'string',are undopresent. {{=code|undo}} 'is ignored if {{=}}'})code|text}} wouldis be a shorthand for:present.
{{pre|
temp{{=}}escape:char('\\'):text('string')
escape:undo(temp, '{{=}}')
}}
 
In the planned implementation, the ''text'' function would be called first, followed by ''undo'' or ''kill''. (If both ''undo'' and ''kill'' are included as keys in the table, ''kill'' would be ignored.)
 
|}
<span id='functions doc'></span>