Module:HTMLParse/doc: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 10: Line 10:
Pluralizes an HTML string by inserting an "s" between the final alphabetic character and closing tag </
Pluralizes an HTML string by inserting an "s" between the final alphabetic character and closing tag </


For example, <code><nowiki><span>book</span></nowiki></code> becomes <code><nowiki><span>books</span></nowiki></code>
For example, <code><nowiki><span>book</span></nowiki></code> becomes <code><nowiki><span>books</span></nowiki></code>.


Won't pluralize anything that already ends in "s"
Notes:
* Won't pluralize anything that already ends in "s".
* Won't pluralize anything that doesn't lua pattern match <code>%a</</code>
===Usage===
===Usage===
<nowiki>{{#invoke: HTMLParse | pluralize | html = (html string here) }}</nowiki>
<nowiki>{{#invoke: HTMLParse | pluralize | html = (html string here) }}</nowiki>