Module:HTMLParse/doc

This module parses and manipulates HTML strings.

There is currently 4 functions:
 * pluralize
 * make_possessive
 * strip_formatting
 * capitalize

pluralize
Pluralizes an HTML string by inserting an "s" between the final alphabetic character and closing tag &lt;/

For example,  becomes.

Notes:
 * Won't pluralize anything that already ends in "s".
 * Won't pluralize anything that doesn't lua pattern match
 * If passing a template that uses a cargo query as the html parameter, be sure that the cargo query is marked with  or this Module might not be able to expand the template correctly.

make_possessive
Identical to  except that instead of inserting an , make_possessive inserts an

strip_formatting
Strips HTML tags from the input string. For example,  becomes.

Example:

Result:

capitalize
Capitalizes the word while preserving HTML formatting. It only takes one argument. turns into: