Skip to content

Commit 2588b1d

Browse files
author
Callum Watson
committed
Let pgf backend use bracket delimiters for detecting math mode (rebased).
1 parent cd9d371 commit 2588b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _get_preamble():
8282

8383

8484
_NO_ESCAPE = r"(?<!\\)(?:\\\\)*"
85-
_split_math = re.compile(_NO_ESCAPE + r"\$").split
85+
_split_math = re.compile(_NO_ESCAPE + r"(?:\$|\\[()])").split
8686
_replace_escapetext = functools.partial(
8787
# When the next character is _, ^, $, or % (not preceded by an escape),
8888
# insert a backslash.

0 commit comments

Comments
 (0)