From 394015a38b3ba3c3e7f5a8f2c6c251fe3b157dac Mon Sep 17 00:00:00 2001 From: sbailey Date: Thu, 17 Dec 2020 15:02:09 -0800 Subject: [PATCH] Add ref/follow name to Cite error cite_error_references_missing_key Bug: T51538 Change-Id: Id19a4e4c37169ca6eb7aecdce66b1662546ae31a --- src/Parsoid/References.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Parsoid/References.php b/src/Parsoid/References.php index a63b0bf95..7344692da 100644 --- a/src/Parsoid/References.php +++ b/src/Parsoid/References.php @@ -215,7 +215,8 @@ class References extends ExtensionTagHandler { if ( $refsData->inReferencesContent() ) { $group = $refsData->getRefGroup( $groupName ); if ( !isset( $group->indexByName[$refName] ) ) { - $errs[] = [ 'key' => 'cite_error_references_missing_key' ]; + $errs[] = [ 'key' => 'cite_error_references_missing_key', + 'params' => [ $refDmw->attrs->name ] ]; } } } else { @@ -242,7 +243,8 @@ class References extends ExtensionTagHandler { // section and it's the $followName we care about, but the // extension to the legacy parser doesn't have an // equivalent key and just outputs something wacky. - $errs[] = [ 'key' => 'cite_error_references_missing_key' ]; + $errs[] = [ 'key' => 'cite_error_references_missing_key', + 'params' => [ $refDmw->attrs->follow ] ]; } } elseif ( $refsData->inReferencesContent() ) { $errs[] = [ 'key' => 'cite_error_references_no_key' ];