Skip to content

Commit dda122a

Browse files
committed
revert regex
1 parent c164b28 commit dda122a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ultraplot/ticker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
"LatitudeFormatter",
5555
]
5656

57-
REGEX_ZERO = re.compile("\\A[-\\N{MINUS SIGN}]?0(.0*)?\\Z")
58-
REGEX_MINUS = re.compile("\\A[-\\\N{MINUS SIGN}]\\Z")
59-
REGEX_MINUS_ZERO = re.compile("\\A[-\\N{MINUS SIGN}]0(.0*)?\\Z")
57+
REGEX_ZERO = re.compile("\\A[-\N{MINUS SIGN}]?0(.0*)?\\Z")
58+
REGEX_MINUS = re.compile("\\A[-\N{MINUS SIGN}]\\Z")
59+
REGEX_MINUS_ZERO = re.compile("\\A[-\N{MINUS SIGN}]0(.0*)?\\Z")
6060

6161
_precision_docstring = """
6262
precision : int, default: {6, 2}
@@ -540,7 +540,7 @@ def _minus_format(string):
540540
Format the minus sign and avoid "negative zero," e.g. ``-0.000``.
541541
"""
542542
if rc["axes.unicode_minus"] and not rc["text.usetex"]:
543-
string = string.replace("-", "\\N{MINUS SIGN}")
543+
string = string.replace("-", "\N{MINUS SIGN}")
544544
if REGEX_MINUS_ZERO.match(string):
545545
string = string[1:]
546546
return string

0 commit comments

Comments
 (0)