# /Foobar/ -- convert to CurrentPage/Foobar, strip the initial / from text
global $wgNamespacesWithSubpages;
+ $fname = 'Parser::maybeDoSubpageLink';
+ wfProfileIn( $fname );
# Look at the first character
if( $target{0} == '/' ) {
# / at end means we don't want the slash to be shown
$ret = $target;
}
+ wfProfileOut( $fname );
return $ret;
}
# So we check for : in the remainder text to split up the
# title and definition, without b0rking links.
# FIXME: This is not foolproof. Something better in Tokenizer might help.
- if( preg_match( '/^(.*?(?:\s| )):(.*)$/', $t, $match ) ) {
+ if( preg_match( '/^(.*?):(.*)$/', $t, $match ) ) {
$term = $match[1];
$output .= $term . $this->nextItem( ':' );
$t = $match[2];
if ( ';' == $char ) {
# FIXME: This is dupe of code above
- if( preg_match( '/^(.*?(?:\s| )):(.*)$/', $t, $match ) ) {
+ if( preg_match( '/^(.*?):(.*)$/', $t, $match ) ) {
$term = $match[1];
$output .= $term . $this->nextItem( ':' );
$t = $match[2];
* @access private
*/
function initialiseVariables() {
- $fname = 'Parser::initialiseVaraibles';
+ $fname = 'Parser::initialiseVariables';
wfProfileIn( $fname );
global $wgVariableIDs;
$this->mVariables = array();
$mw =& MagicWord::get( $id );
$mw->addToArray( $this->mVariables, $this->getVariableValue( $id ) );
}
- $fname = 'Parser::initialiseVaraibles';
wfProfileOut( $fname );
}