diff --git a/extension.json b/extension.json index 16e2ad1a..0ce21f0d 100644 --- a/extension.json +++ b/extension.json @@ -88,6 +88,10 @@ "misnested-tag": { "severity": "warning", "enabled": true + }, + "pwrap-bug-workaround": { + "severity": "warning", + "enabled": true } }, "LinterSubmitterWhitelist": { diff --git a/i18n/en.json b/i18n/en.json index bed97b6b..d00799e1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,6 +17,7 @@ "linter-pager-self-closed-tag-details": "Self-closed tag", "linter-pager-deletable-table-tag-details": "Table tag that should be deleted", "linter-pager-misnested-tag-details": "Misnested tag which should be properly nested", + "linter-pager-pwrap-bug-workaround-details": "Paragraph wrapping bug workaround", "linter-category-fostered": "Fostered content", "linter-category-fostered-desc": "These pages have fostered content.", "linter-category-obsolete-tag": "Obsolete HTML tags", @@ -33,6 +34,8 @@ "linter-category-deletable-table-tag-desc": "These pages have table tags that should be deleted.", "linter-category-misnested-tag": "Misnested tags", "linter-category-misnested-tag-desc": "These pages have misnested tags that could be fixed.", + "linter-category-pwrap-bug-workaround": "Paragraph wrapping bug workaround", + "linter-category-pwrap-bug-workaround-desc": "These pages have a paragraph wrapping bug that could be worked around.", "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})", "linker-page-title-edit": "$1 ($2)", "linker-page-edit": "edit", diff --git a/i18n/qqq.json b/i18n/qqq.json index b61d5de7..daea3b24 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -19,6 +19,7 @@ "linter-pager-self-closed-tag-details": "Table column heading", "linter-pager-deletable-table-tag-details": "Table column heading", "linter-pager-misnested-tag-details": "Table column heading", + "linter-pager-pwrap-bug-workaround-details": "Table column heading", "linter-category-fostered": "Name of lint error category. See [[:mw:Help:Extension:Linter/fostered]]", "linter-category-fostered-desc": "Description of category.", "linter-category-obsolete-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/obsolete-tag]]", @@ -35,6 +36,8 @@ "linter-category-deletable-table-tag-desc": "Description of category.", "linter-category-misnested-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/misnested-tag]]", "linter-category-misnested-tag-desc": "Description of category.", + "linter-category-pwrap-bug-workaround": "Name of lint error category. See [[:mw:Help:Extension:Linter/pwrap-bug-workaround]]", + "linter-category-pwrap-bug-workaround-desc": "Description of category.", "linter-numerrors": "Shown after a category link to indicate how many errors are in that category. $1 is the number of errors, and can be used for PLURAL.\n{{Identical|Error}}", "linker-page-title-edit": "Used in a table cell. $1 is a link to the page, $2 is pipe separated links to the edit and history pages, the link text is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}", "linker-page-edit": "Link text for edit link in {{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}", diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php index 2d529dd0..b7a7b783 100644 --- a/includes/CategoryManager.php +++ b/includes/CategoryManager.php @@ -43,6 +43,7 @@ class CategoryManager { 'self-closed-tag' => 6, 'deletable-table-tag' => 7, 'misnested-tag' => 8, + 'pwrap-bug-workaround' => 9, ]; /** diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php index db762a63..6766799f 100644 --- a/includes/LintErrorsPager.php +++ b/includes/LintErrorsPager.php @@ -134,6 +134,11 @@ class LintErrorsPager extends TablePager { return Html::element( 'code', [], $in ); }, $lintError->params['items'] ); return $this->getLanguage()->commaList( $list ); + } elseif ( $this->category === 'pwrap-bug-workaround' && + isset( $lintError->params['root'] ) && + isset( $lintError->params['child'] ) ) { + return Html::element( 'code', [], + $lintError->params['root'] . " > " . $lintError->params['child'] ); } return ''; case 'template':