This class handles formatting poems in WikiText, specifically anything within <poem></poem> tags.
More...
This class handles formatting poems in WikiText, specifically anything within <poem></poem> tags.
- Note
- CC0-1.0
- Author
- Nikola Smolenski smole.nosp@m.nsk@.nosp@m.eunet.nosp@m..yu
Definition at line 10 of file Poem.php.
◆ indentVerse()
static Poem::indentVerse |
( |
array | $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that wraps content in an indented span.
- Parameters
-
string[] | $m | Matches from the regular expression
- $m[1] consists of 1 or more colons
- $m[2] consists of the text after the colons
|
- Returns
- string
Definition at line 84 of file Poem.php.
References $attribs, and and().
◆ init()
static Poem::init |
( |
Parser | $parser | ) |
|
|
static |
Bind the renderPoem function to the <poem> tag.
- Parameters
-
Definition at line 15 of file Poem.php.
References $parser.
◆ renderPoem()
Parse the text into proper poem format.
- Parameters
-
string | null | $in | The text inside the poem tag |
string[] | $param | |
Parser | $parser | |
PPFrame | $frame | |
- Returns
- string
Definition at line 27 of file Poem.php.
References $attribs, $parser, and and().
◆ replaceSpaces()
static Poem::replaceSpaces |
( |
array | $m | ) |
|
|
staticprotected |
Callback for preg_replace_callback() that replaces spaces with non-breaking spaces.
- Parameters
-
string[] | $m | Matches from the regular expression
- $m[1] consists of 1 or more spaces
|
- Returns
- string
Definition at line 73 of file Poem.php.
References and().
The documentation for this class was generated from the following file: