瀏覽代碼

wikiproject_tagger: Fix regex for wikiproject banner shells.

tags/v0.3
Ben Kurtovic 7 年之前
父節點
當前提交
b48af48de4
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      earwigbot/tasks/wikiproject_tagger.py

+ 1
- 1
earwigbot/tasks/wikiproject_tagger.py 查看文件

@@ -383,7 +383,7 @@ class WikiProjectTagger(Task):

def get_banner_shell(self, code):
"""Return the banner shell template within *code*, else ``None``."""
regex = r"^\{\{\s*((WikiProject|WP)[ _]?Banner[ _]?S(hell)?|W(BPS|PBS|PB)|Shell)"
regex = r"^\{\{\s*((WikiProject|WP)[ _]?Banner[ _]?S(hell)?|W(BPS|PBS|PB)|Shell)\s*(\||\}\})"
shells = code.filter_templates(matches=regex)
if not shells:
shells = code.filter_templates(matches=regex, recursive=True)


Loading…
取消
儲存