Skip to content

Commit fea45e4

Browse files
committed
fixes
1 parent 625d4f5 commit fea45e4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/matplotlib/mathtext.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,21 +2505,20 @@ def symbol(self, s, loc, toks):
25052505
# Binary operators at start of string should not be spaced
25062506
if (c in self._binary_operators and
25072507
(len(s[:loc].split()) == 0 or prev_char == '{' or
2508-
prev_char == '(')):
2508+
prev_char in self._left_delim)):
25092509
return [char]
25102510
else:
2511-
return [Hlist( [self._make_space(0.2),
2512-
char,
2513-
self._make_space(0.2)] ,
2511+
return [Hlist([self._make_space(0.2),
2512+
char,
2513+
self._make_space(0.2)] ,
25142514
do_kern = True)]
25152515
elif c in self._punctuation_symbols:
2516-
# Do not space points as decimal separators
2517-
digits = set(r'0 1 2 3 4 5 6 7 8 9'.split())
2518-
if (c == '.' and s[loc - 1] in digits and s[loc + 1] in digits):
2516+
# Do not space dots as decimal separators
2517+
if (c == '.' and s[loc - 1].isdigit() and s[loc + 1].isdigit()):
25192518
return [char]
25202519
else:
2521-
return [Hlist( [char,
2522-
self._make_space(0.2)] ,
2520+
return [Hlist([char,
2521+
self._make_space(0.2)],
25232522
do_kern = True)]
25242523
return [char]
25252524

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy