return $r ;
}
-
-
function newCategoryMagic () {
global $wgLang;
if ( !$this->mOptions->getUseCategoryMagic() ) return ; # Doesn't use categories at all
# Parses the text and adds the result to the strip state
# Returns the strip tag
- function stripParse( $text, $newline, $args )
- {
+ function stripParse( $text, $newline, $args ) {
$text = $this->strip( $text, $this->mStripState );
$text = $this->internalParse( $text, (bool)$newline, $args, false );
return $newline.$this->insertStripItem( $text, $this->mStripState );
}
# Now close all remaining tags. Notice that the order is important.
if ($state == 'strong' || $state == 'emstrong')
- $output .= "</strong>";
+ $output .= '</strong>';
if ($state == 'em' || $state == 'strongem' || $state == 'emstrong')
- $output .= "</em>";
+ $output .= '</em>';
if ($state == 'strongem')
- $output .= "</strong>";
+ $output .= '</strong>';
if ($state == 'both')
$output .= "<strong><em>{$buffer}</em></strong>";
return $output;
/* private */ function nextItem( $char ) {
if ( '*' == $char || '#' == $char ) { return '</li><li>'; }
else if ( ':' == $char || ';' == $char ) {
- $close = "</dd>";
+ $close = '</dd>';
if ( $this->mDTopen ) { $close = '</dt>'; }
if ( ';' == $char ) {
$this->mDTopen = true;
}
foreach ( $textLines as $oLine ) {
$lastPrefixLength = strlen( $lastPrefix );
- $preCloseMatch = preg_match("/<\\/pre/i", $oLine );
- $preOpenMatch = preg_match("/<pre/i", $oLine );
+ $preCloseMatch = preg_match('/<\\/pre/i', $oLine );
+ $preOpenMatch = preg_match('/<pre/i', $oLine );
if ( !$this->mInPre ) {
# Multiple prefixes may abut each other for nested lists.
$prefixLength = strspn( $oLine, '*#:;' );
$output .= $this->nextItem( substr( $pref, -1 ) );
$paragraphStack = false;
- if ( ";" == substr( $pref, -1 ) ) {
+ if ( substr( $pref, -1 ) == ';') {
# The one nasty exception: definition lists work like this:
# ; title : definition text
# So we check for : in the remainder text to split up the