From 33c69346fe379fe1f042a749fd341ebb0571f08a Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 24 Sep 2024 13:01:51 -0400 Subject: [PATCH] Remove backward-compatibility with old Scribunto cached content Old content in the ParserCache may have scribunto errors tagged using the 'id' attribute instead of 'class'. We don't need that compatibility code once the content expires from the parser cache. Bug: T375539 Follows-Up: I123a0f0046a616f63506f096651ae917bbc65cc5 Change-Id: I22ade9ec45971a96fbbd148fbd11ea9bbd2098cf --- modules/ext.scribunto.errors.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/ext.scribunto.errors.js b/modules/ext.scribunto.errors.js index 12a9bcc3..afb83e58 100644 --- a/modules/ext.scribunto.errors.js +++ b/modules/ext.scribunto.errors.js @@ -5,11 +5,7 @@ let popup; $( '.scribunto-error' ).each( ( index, span ) => { - let matches = regex.exec( span.className ); - if ( matches === null ) { - // T375539: backward-compatibility with old cached HTML - matches = regex.exec( span.id ); - } + const matches = regex.exec( span.className ); if ( matches === null ) { mw.log( 'mw.scribunto.errors: regex mismatch!' ); return;