Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcbe505

Browse files
committed
Don't handle unknown_symbols in \operatorname.
Explicitly listing unknown_symbol (i.e., `\nonexistingsymbol`) in the `\operatorname` mathtext parser doesn't really matter as the parse action for such symbols is to immediately throw an exception; so we may as well not bother listing them.
1 parent 81f5f24 commit dcbe505

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,8 +1881,7 @@ def csnames(group, names):
18811881

18821882
p.function <<= csnames("name", self._function_names)
18831883
p.operatorname <<= cmd(
1884-
r"\operatorname",
1885-
"{" + ZeroOrMore(p.simple | p.unknown_symbol)("name") + "}")
1884+
r"\operatorname", "{" + ZeroOrMore(p.simple)("name") + "}")
18861885

18871886
p.group <<= p.start_group + ZeroOrMore(p.token)("group") + p.end_group
18881887

0 commit comments

Comments
 (0)