Explorar el Código

wikiproject_tagger: Fix regex for wikiproject banner shells.

tags/v0.3
Ben Kurtovic hace 7 años
padre
commit
b48af48de4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      earwigbot/tasks/wikiproject_tagger.py

+ 1
- 1
earwigbot/tasks/wikiproject_tagger.py Ver fichero

@@ -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)


Cargando…
Cancelar
Guardar