diff --git a/extension.json b/extension.json index 11364b9f..a8275ac7 100644 --- a/extension.json +++ b/extension.json @@ -107,6 +107,10 @@ "enabled": true, "priority": "high", "parser-migration": true + }, + "multi-colon-escape": { + "enabled": true, + "priority": "medium" } }, "LinterSubmitterWhitelist": { diff --git a/i18n/en.json b/i18n/en.json index c92cb3ab..542d2dd8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -13,6 +13,7 @@ "linter-pager-obsolete-tag-details": "Obsolete HTML tag", "linter-pager-bogus-image-options-details": "Bogus file option", "linter-pager-missing-end-tag-details": "Missing end tag", + "linter-pager-multi-colon-escape-details": "Multi colon escape", "linter-pager-stripped-tag-details": "Stripped tag", "linter-pager-self-closed-tag-details": "Self-closed tag", "linter-pager-deletable-table-tag-details": "Table tag that should be deleted", @@ -27,6 +28,8 @@ "linter-category-bogus-image-options-desc": "These pages have files with bogus options.", "linter-category-missing-end-tag": "Missing end tag", "linter-category-missing-end-tag-desc": "These pages have missing end tags.", + "linter-category-multi-colon-escape": "Multi colon escape", + "linter-category-multi-colon-escape-desc": "These pages have links prefixed with multiple colons.", "linter-category-stripped-tag": "Stripped tags", "linter-category-stripped-tag-desc": "These pages have stripped tags.", "linter-category-self-closed-tag": "Self-closed tags", diff --git a/i18n/qqq.json b/i18n/qqq.json index c3f7a719..a06715fb 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,6 +17,7 @@ "linter-pager-obsolete-tag-details": "Table column heading", "linter-pager-bogus-image-options-details": "Table column heading", "linter-pager-missing-end-tag-details": "Table column heading", + "linter-pager-multi-colon-escape-details": "Table column heading", "linter-pager-stripped-tag-details": "Table column heading", "linter-pager-self-closed-tag-details": "Table column heading", "linter-pager-deletable-table-tag-details": "Table column heading", @@ -31,6 +32,8 @@ "linter-category-bogus-image-options-desc": "Description of category", "linter-category-missing-end-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/missing-end-tag]]", "linter-category-missing-end-tag-desc": "Description of category", + "linter-category-multi-colon-escape": "Name of lint error category. See [[:mw:Help:Extension:Linter/multi-colon-escape]]", + "linter-category-multi-colon-escape-desc": "Description of category", "linter-category-stripped-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/stripped-tag]]", "linter-category-stripped-tag-desc": "Description of category", "linter-category-self-closed-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/self-closed-tag]]", diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php index f3692a5d..23527c7f 100644 --- a/includes/CategoryManager.php +++ b/includes/CategoryManager.php @@ -45,7 +45,8 @@ class CategoryManager { 'deletable-table-tag' => 7, 'misnested-tag' => 8, 'pwrap-bug-workaround' => 9, - 'tidy-whitespace-bug' => 10 + 'tidy-whitespace-bug' => 10, + 'multi-colon-escape' => 11, ]; /** diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php index 068ef944..dbf206f3 100644 --- a/includes/LintErrorsPager.php +++ b/includes/LintErrorsPager.php @@ -160,6 +160,9 @@ class LintErrorsPager extends TablePager { isset( $lintError->params['sibling'] ) ) { return Html::element( 'code', [], $lintError->params['node'] . " + " . $lintError->params['sibling'] ); + } elseif ( $this->category === 'multi-colon-escape' && + isset( $lintError->params['href'] ) ) { + return Html::element( 'code', [], $lintError->params['href'] ); } return ''; case 'template':