diff --git a/earwigbot/commands/dictionary.py b/earwigbot/commands/dictionary.py index 533bfb4..9aab566 100644 --- a/earwigbot/commands/dictionary.py +++ b/earwigbot/commands/dictionary.py @@ -128,7 +128,7 @@ class Dictionary(Command): def parse_body(self, body): substitutions = [ ("", ""), - ("\[\[(.*?)\|(.*?)\]\]", r"\2"), + ("\[\[[^\]|]*?\|([^\]|]*?)\]\]", r"\1"), ("\{\{(.*?) of\|(.*?)\}\}", r"\1 of \2."), ("\{\{w\|(.*?)\}\}", r"\1"), ("\{\{surname(.*?)\}\}", r"A surname."),