From ac4795fb52eb1f745a6dc21e35c9e0b011d25c6e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 17 Dec 2024 21:30:04 +0000 Subject: [PATCH] Special:MathStatus: Fix unexpected paragraph blocks inside form labels By using parseAsBlock(), each message was wrapped inside a paragraph which is then wrapped inside a label, thus preventing the label's own baseline alignment and whitespace from applying correctly. Screenshot comparison on task. Bug: T382375 Change-Id: Ib8a811e8ecb86faf04651f968e188d05711d46c1 --- src/Widget/MathTestInputForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widget/MathTestInputForm.php b/src/Widget/MathTestInputForm.php index a0ee4b97d..60308ab07 100644 --- a/src/Widget/MathTestInputForm.php +++ b/src/Widget/MathTestInputForm.php @@ -54,7 +54,7 @@ class MathTestInputForm extends OOUIHTMLForm { // Messages that can be used here: // * math-form-type-tex // * math-form-type-chem - $txt = wfMessage( $optionLabelPrefix[$key] . $value )->parseAsBlock(); + $txt = wfMessage( $optionLabelPrefix[$key] . $value )->parse(); $options[$txt] = $value; } $form[$key]['options'] = $options;