Module:String2/doc: Difference between revisions

Content deleted Content added
hyphen2dash: Accept-this-as-written markup
sentence: typo: wiki-markup > wiki markup, see wikt:wiki markup
Line 17:
 
=== sentence ===
The sentence function finds the first letter and capitalises it, then renders the rest of the text in lower case. It works properly with text containing wiki- markup. Compare <code><nowiki>{{#invoke:String2|sentence|[[action game]]}}</nowiki></code> -> {{#invoke:String2|sentence|[[action game]]}} with <code><nowiki>{{ucfirst:{{lc:[[action game]]}}}}</nowiki></code> -> {{ucfirst:{{lc:[[action game]]}}}}. Piped wiki-links are handled as well:
* <code><nowiki>{{#invoke:String2|sentence|[[trimix (breathing gas)|trimix]]}}</nowiki></code> -> {{#invoke:String2|sentence|[[trimix (breathing gas)|trimix]]}}
So are lists: