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:
Adam Wight 2023-12-12 08:11:18 +01:00
parent 44ba7a89e2
commit c021c201c0

View file

@ -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;
}