Explorar el Código

Trying an even more complex regular expression for {{x of}} templates.

tags/v0.1^2
Ben Kurtovic hace 12 años
padre
commit
a2b3b784b1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      earwigbot/commands/dictionary.py

+ 2
- 2
earwigbot/commands/dictionary.py Ver fichero

@@ -131,10 +131,10 @@ class Dictionary(Command):
("<!--(.*?)-->", ""),
("\[\[[^\]|]*?\|([^\]|]*?)\]\]", r"\1"),
("\{\{unsupported\|(.*?)\}\}", r"\1"),
("\{\{(.*?) of\|(.*?)(\||\}\})", r"\1 of \2."),
("\{\{(.*?) of\|([^}|]*?)\||(?:\}\})", r"\1 of \2."),
("\{\{w\|(.*?)\}\}", r"\1"),
("\{\{surname(.*?)\}\}", r"A surname."),
("\{\{given name\|(.*?)(\||\}\})", r"A \1 given name."),
("\{\{given name\|([^}|]*?)\||(?:\}\})", r"A \1 given name."),
]

senses = []


Cargando…
Cancelar
Guardar