diff --git a/lib/matplotlib/_mathtext.py b/lib/matplotlib/_mathtext.py index 46340843f691..b41dca9d6988 100644 --- a/lib/matplotlib/_mathtext.py +++ b/lib/matplotlib/_mathtext.py @@ -1881,8 +1881,7 @@ def csnames(group, names): p.function <<= csnames("name", self._function_names) p.operatorname <<= cmd( - r"\operatorname", - "{" + ZeroOrMore(p.simple | p.unknown_symbol)("name") + "}") + r"\operatorname", "{" + ZeroOrMore(p.simple)("name") + "}") p.group <<= p.start_group + ZeroOrMore(p.token)("group") + p.end_group