mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Remove TODOs and FIXMEs that we are not going to fix
Change-Id: I588d9e8f74247adcb26ecdc14b49cf8056291a2e
This commit is contained in:
parent
832a7ff9b8
commit
6cb84a1829
|
@ -32,7 +32,6 @@ class AnchorFormatter {
|
||||||
* @return string A key for use in wikitext
|
* @return string A key for use in wikitext
|
||||||
*/
|
*/
|
||||||
public function refKey( string $key, string $num = null ) : string {
|
public function refKey( string $key, string $num = null ) : string {
|
||||||
// FIXME: Move the message to 'cite_ref_link_*'
|
|
||||||
$prefix = $this->messageLocalizer->msg( 'cite_reference_link_prefix' )->text();
|
$prefix = $this->messageLocalizer->msg( 'cite_reference_link_prefix' )->text();
|
||||||
$suffix = $this->messageLocalizer->msg( 'cite_reference_link_suffix' )->text();
|
$suffix = $this->messageLocalizer->msg( 'cite_reference_link_suffix' )->text();
|
||||||
if ( $num !== null ) {
|
if ( $num !== null ) {
|
||||||
|
|
10
src/Cite.php
10
src/Cite.php
|
@ -236,9 +236,6 @@ class Cite {
|
||||||
return StatusValue::newFatal( 'cite_error_included_ref' );
|
return StatusValue::newFatal( 'cite_error_included_ref' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Assert things such as $text is different than existing ref with $name,
|
|
||||||
// currently done in `pushRef`.
|
|
||||||
|
|
||||||
return StatusValue::newGood();
|
return StatusValue::newGood();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,10 +251,6 @@ class Cite {
|
||||||
string $group,
|
string $group,
|
||||||
?string $name
|
?string $name
|
||||||
) : StatusValue {
|
) : StatusValue {
|
||||||
// FIXME: Some assertions make assumptions that rely on earlier tests not failing.
|
|
||||||
// These dependencies need to be explicit so they aren't accidentally broken by
|
|
||||||
// reordering in the future, or made more robust to initial conditions.
|
|
||||||
|
|
||||||
if ( $group !== $this->inReferencesGroup ) {
|
if ( $group !== $this->inReferencesGroup ) {
|
||||||
// <ref> and <references> have conflicting group attributes.
|
// <ref> and <references> have conflicting group attributes.
|
||||||
return StatusValue::newFatal( 'cite_error_references_group_mismatch',
|
return StatusValue::newFatal( 'cite_error_references_group_mismatch',
|
||||||
|
@ -298,9 +291,6 @@ class Cite {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Looks like this should be split into a section insensitive to context, and the
|
|
||||||
* special handling for each context.
|
|
||||||
*
|
|
||||||
* @param Parser $parser
|
* @param Parser $parser
|
||||||
* @param ?string $text Raw, untrimmed wikitext content of the <ref> tag, if any
|
* @param ?string $text Raw, untrimmed wikitext content of the <ref> tag, if any
|
||||||
* @param string[] $argv Arguments as given in <ref name=…>, already trimmed
|
* @param string[] $argv Arguments as given in <ref name=…>, already trimmed
|
||||||
|
|
|
@ -135,7 +135,6 @@ class ReferenceStack {
|
||||||
|
|
||||||
if ( $follow && isset( $this->refs[$group][$follow] ) ) {
|
if ( $follow && isset( $this->refs[$group][$follow] ) ) {
|
||||||
// We know the parent note already, so just perform the "follow" and bail out
|
// We know the parent note already, so just perform the "follow" and bail out
|
||||||
// TODO: Separate `pushRef` from these side-effects.
|
|
||||||
$this->appendText( $group, $follow, ' ' . $text );
|
$this->appendText( $group, $follow, ' ' . $text );
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -341,10 +340,10 @@ class ReferenceStack {
|
||||||
case 'new':
|
case 'new':
|
||||||
// Rollback the addition of new elements to the stack
|
// Rollback the addition of new elements to the stack
|
||||||
unset( $this->refs[$group][$lookup] );
|
unset( $this->refs[$group][$lookup] );
|
||||||
|
// TODO: Don't we need to rollback groupRefSequence and extendsCount as well?
|
||||||
if ( !$this->refs[$group] ) {
|
if ( !$this->refs[$group] ) {
|
||||||
$this->popGroup( $group );
|
$this->popGroup( $group );
|
||||||
}
|
}
|
||||||
// TODO: else, don't we need to decrement groupRefSequence?
|
|
||||||
break;
|
break;
|
||||||
case 'new-from-placeholder':
|
case 'new-from-placeholder':
|
||||||
$this->refs[$group][$lookup]['__placeholder__'] = true;
|
$this->refs[$group][$lookup]['__placeholder__'] = true;
|
||||||
|
|
Loading…
Reference in a new issue