mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 02:55:04 +00:00
Rename internal variable
Updates the name to reflect the purpose and the new name for a cite tag, now "ref". Change-Id: I778641ad58048dd2c33b6487171c338555b0789b
This commit is contained in:
parent
44ba7a89e2
commit
c021c201c0
10
src/Cite.php
10
src/Cite.php
|
@ -53,7 +53,7 @@ class Cite {
|
|||
* True when a <ref> tag is being processed.
|
||||
* Used to avoid infinite recursion
|
||||
*/
|
||||
private bool $mInCite = false;
|
||||
private bool $inRefTag = false;
|
||||
|
||||
/**
|
||||
* @var null|string The current group name while parsing nested <ref> in <references>. Null when
|
||||
|
@ -100,13 +100,13 @@ class Cite {
|
|||
* @return string|null Null in case a <ref> tag is not allowed in the current context
|
||||
*/
|
||||
public function ref( Parser $parser, ?string $text, array $argv ): ?string {
|
||||
if ( $this->mInCite ) {
|
||||
if ( $this->inRefTag ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->mInCite = true;
|
||||
$this->inRefTag = true;
|
||||
$ret = $this->guardedRef( $parser, $text, $argv );
|
||||
$this->mInCite = false;
|
||||
$this->inRefTag = false;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ class Cite {
|
|||
* @return string|null Null in case a <references> tag is not allowed in the current context
|
||||
*/
|
||||
public function references( Parser $parser, ?string $text, array $argv ): ?string {
|
||||
if ( $this->mInCite || $this->inReferencesGroup !== null ) {
|
||||
if ( $this->inRefTag || $this->inReferencesGroup !== null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue