MediaWiki REL1_35
|
Static Public Member Functions | |
static | doBlockLevels ( $text, $lineStart) |
Make lists from lines starting with ':', '*', '#', etc. | |
Private Member Functions | |
__construct ( $text, $lineStart) | |
closeList ( $char) | |
Close the current list item identified by the prefix character. | |
closeParagraph ( $atTheEnd=false) | |
If a pre or p is open, return the corresponding close tag and update the state. | |
execute () | |
Execute the pass. | |
findColonNoLinks ( $str, &$before, &$after) | |
Split up a string on ':', ignoring any occurrences inside tags to prevent illegal overlapping. | |
getCommon ( $st1, $st2) | |
getCommon() returns the length of the longest common substring of both arguments, starting at the beginning of both. | |
hasOpenParagraph () | |
nextItem ( $char) | |
Close the current list item and open the next one. | |
openList ( $char) | |
Open the list item element identified by the prefix character. | |
Private Attributes | |
$DTopen = false | |
$inPre = false | |
$lastParagraph = '' | |
$lineStart | |
$text | |
const | COLON_STATE_CLOSETAG = 3 |
const | COLON_STATE_COMMENT = 5 |
const | COLON_STATE_COMMENTDASH = 6 |
const | COLON_STATE_COMMENTDASHDASH = 7 |
const | COLON_STATE_LC = 8 |
const | COLON_STATE_TAG = 1 |
const | COLON_STATE_TAGSLASH = 4 |
const | COLON_STATE_TAGSTART = 2 |
const | COLON_STATE_TEXT = 0 |
Definition at line 26 of file BlockLevelPass.php.
|
private |
string | $text | |
bool | $lineStart |
Definition at line 61 of file BlockLevelPass.php.
References $lineStart, and $text.
|
private |
Close the current list item identified by the prefix character.
string | $char |
Definition at line 169 of file BlockLevelPass.php.
References $text.
Referenced by execute().
|
private |
If a pre or p is open, return the corresponding close tag and update the state.
If no tag is open, return an empty string.
bool | $atTheEnd | Omit trailing newline if we've reached the end. |
Definition at line 79 of file BlockLevelPass.php.
References hasOpenParagraph().
Referenced by execute(), and openList().
|
static |
Make lists from lines starting with ':', '*', '#', etc.
string | $text | |
bool | $lineStart | Whether or not this is at the start of a line. |
Definition at line 52 of file BlockLevelPass.php.
References $lineStart, and $text.
Referenced by Parser\doBlockLevels(), and Parser\internalParseHalfParsed().
|
private |
Execute the pass.
Definition at line 191 of file BlockLevelPass.php.
References $t, $text, closeList(), closeParagraph(), StringUtils\explode(), findColonNoLinks(), getCommon(), hasOpenParagraph(), nextItem(), and openList().
|
private |
Split up a string on ':', ignoring any occurrences inside tags to prevent illegal overlapping.
string | $str | The string to split |
string | &$before | Set to everything before the ':' |
string | &$after | Set to everything after the ':' |
MWException |
Definition at line 444 of file BlockLevelPass.php.
References COLON_STATE_CLOSETAG, COLON_STATE_COMMENT, COLON_STATE_COMMENTDASH, COLON_STATE_COMMENTDASHDASH, COLON_STATE_LC, COLON_STATE_TAG, COLON_STATE_TAGSLASH, COLON_STATE_TAGSTART, COLON_STATE_TEXT, and wfDebug().
Referenced by execute().
|
private |
getCommon() returns the length of the longest common substring of both arguments, starting at the beginning of both.
string | $st1 | |
string | $st2 |
Definition at line 101 of file BlockLevelPass.php.
Referenced by execute().
|
private |
Definition at line 69 of file BlockLevelPass.php.
Referenced by closeParagraph(), and execute().
|
private |
Close the current list item and open the next one.
string | $char |
Definition at line 144 of file BlockLevelPass.php.
Referenced by execute().
|
private |
Open the list item element identified by the prefix character.
string | $char |
Definition at line 119 of file BlockLevelPass.php.
References closeParagraph().
Referenced by execute().
|
private |
Definition at line 27 of file BlockLevelPass.php.
|
private |
Definition at line 28 of file BlockLevelPass.php.
|
private |
Definition at line 29 of file BlockLevelPass.php.
|
private |
Definition at line 30 of file BlockLevelPass.php.
Referenced by __construct(), and doBlockLevels().
|
private |
Definition at line 31 of file BlockLevelPass.php.
Referenced by __construct(), closeList(), doBlockLevels(), and execute().
|
private |
Definition at line 37 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 39 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 40 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 41 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 42 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 35 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 38 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 36 of file BlockLevelPass.php.
Referenced by findColonNoLinks().
|
private |
Definition at line 34 of file BlockLevelPass.php.
Referenced by findColonNoLinks().