dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix some spacing
[lhc/web/wiklou.git]
/
includes
/
parser
/
Parser.php
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
ed5071e
..
6270a87
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-122,8
+122,8
@@
class Parser {
var $mFunctionHooks = array();
var $mFunctionSynonyms = array( 0 => array(), 1 => array() );
var $mFunctionTagHooks = array();
var $mFunctionHooks = array();
var $mFunctionSynonyms = array( 0 => array(), 1 => array() );
var $mFunctionTagHooks = array();
- var $mStripList
= array();
- var $mDefaultStripList
= array();
+ var $mStripList = array();
+ var $mDefaultStripList = array();
var $mVarCache = array();
var $mImageParams = array();
var $mImageParamsMagicArray = array();
var $mVarCache = array();
var $mImageParams = array();
var $mImageParamsMagicArray = array();
@@
-305,12
+305,11
@@
class Parser {
* string constructs.
*
* Must not consist of all title characters, or else it will change
* string constructs.
*
* Must not consist of all title characters, or else it will change
- * the behavio
u
r of <nowiki> in a link.
+ * the behavior of <nowiki> in a link.
*/
$this->mUniqPrefix = "\x7fUNIQ" . self::getRandomString();
$this->mStripState = new StripState( $this->mUniqPrefix );
*/
$this->mUniqPrefix = "\x7fUNIQ" . self::getRandomString();
$this->mStripState = new StripState( $this->mUniqPrefix );
-
# Clear these on every parse, bug 4549
$this->mTplExpandCache = $this->mTplRedirCache = $this->mTplDomCache = array();
# Clear these on every parse, bug 4549
$this->mTplExpandCache = $this->mTplRedirCache = $this->mTplDomCache = array();
@@
-843,16
+842,16
@@
class Parser {
}
if ( count( $p ) > 5 ) {
# comment
}
if ( count( $p ) > 5 ) {
# comment
- $element
= $p[4];
+ $element = $p[4];
$attributes = '';
$attributes = '';
- $close
= '';
- $inside
= $p[5];
+ $close = '';
+ $inside = $p[5];
} else {
# tag
} else {
# tag
- $element
= $p[1];
+ $element = $p[1];
$attributes = $p[2];
$attributes = $p[2];
- $close
= $p[3];
- $inside
= $p[4];
+ $close = $p[3];
+ $inside = $p[4];
}
$marker = "$uniq_prefix-$element-" . sprintf( '%08X', $n++ ) . self::MARKER_SUFFIX;
}
$marker = "$uniq_prefix-$element-" . sprintf( '%08X', $n++ ) . self::MARKER_SUFFIX;
@@
-1005,7
+1004,7
@@
class Parser {
array_push( $tr_history, false );
array_push( $td_history, false );
array_push( $last_tag_history, '' );
array_push( $tr_history, false );
array_push( $td_history, false );
array_push( $last_tag_history, '' );
- } elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 )
=== '|+' ) {
+ } elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 ) === '|+' ) {
# This might be cell elements, td, th or captions
if ( substr( $line, 0, 2 ) === '|+' ) {
$first_character = '+';
# This might be cell elements, td, th or captions
if ( substr( $line, 0, 2 ) === '|+' ) {
$first_character = '+';
@@
-1314,7
+1313,6
@@
class Parser {
return $text . $trail;
}
return $text . $trail;
}
-
/**
* Parse headers and return html
*
/**
* Parse headers and return html
*
@@
-1952,7
+1950,7
@@
class Parser {
wfProfileOut( __METHOD__ . "-might_be_img" );
}
wfProfileOut( __METHOD__ . "-might_be_img" );
}
- $wasblank = ( $text
== '' );
+ $wasblank = ( $text == '' );
if ( $wasblank ) {
$text = $link;
} else {
if ( $wasblank ) {
$text = $link;
} else {
@@
-3471,7
+3469,7
@@
class Parser {
{
# Bug 529: if the template begins with a table or block-level
# element, it should be treated as beginning a new line.
{
# Bug 529: if the template begins with a table or block-level
# element, it should be treated as beginning a new line.
- # This behavio
u
r is somewhat controversial.
+ # This behavior is somewhat controversial.
$text = "\n" . $text;
}
$text = "\n" . $text;
}
@@
-4120,7
+4118,7
@@
class Parser {
# Increase TOC level
$toclevel++;
$sublevelCount[$toclevel] = 0;
# Increase TOC level
$toclevel++;
$sublevelCount[$toclevel] = 0;
- if ( $toclevel
<
$wgMaxTocLevel ) {
+ if ( $toclevel
<
$wgMaxTocLevel ) {
$prevtoclevel = $toclevel;
$toc .= Linker::tocIndent();
$numVisible++;
$prevtoclevel = $toclevel;
$toc .= Linker::tocIndent();
$numVisible++;
@@
-4142,7
+4140,7
@@
class Parser {
if ( $i == 0 ) {
$toclevel = 1;
}
if ( $i == 0 ) {
$toclevel = 1;
}
- if ( $toclevel
<
$wgMaxTocLevel ) {
+ if ( $toclevel
<
$wgMaxTocLevel ) {
if ( $prevtoclevel < $wgMaxTocLevel ) {
# Unindent only if the previous toc level was shown :p
$toc .= Linker::tocUnindent( $prevtoclevel - $toclevel );
if ( $prevtoclevel < $wgMaxTocLevel ) {
# Unindent only if the previous toc level was shown :p
$toc .= Linker::tocUnindent( $prevtoclevel - $toclevel );
@@
-4153,7
+4151,7
@@
class Parser {
}
} else {
# No change in level, end TOC line
}
} else {
# No change in level, end TOC line
- if ( $toclevel
<
$wgMaxTocLevel ) {
+ if ( $toclevel
<
$wgMaxTocLevel ) {
$toc .= Linker::tocLineEnd();
}
}
$toc .= Linker::tocLineEnd();
}
}