Skip to content

Commit 0ba679f

Browse files
committed
apply unary spacing to all relational operators
1 parent 4a0cbf6 commit 0ba679f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,8 @@ def symbol(self, s: str, loc: int,
22852285
if (self._in_subscript_or_superscript or (
22862286
c in self._binary_operators and (
22872287
len(s[:loc].split()) == 0 or prev_char == '{' or
2288-
prev_char in self._left_delims or prev_char == '='))):
2288+
prev_char in self._left_delims or
2289+
prev_char in self._relation_symbols))):
22892290
return [char]
22902291
else:
22912292
return [Hlist([self._make_space(0.2),

lib/matplotlib/tests/test_mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
r'$,$ $.$ $1{,}234{, }567{ , }890$ and $1,234,567,890$', # github issue 5799
125125
r'$\left(X\right)_{a}^{b}$', # github issue 7615
126126
r'$\dfrac{\$100.00}{y}$', # github issue #1888
127-
r'$a=-b-c$' # github issue #28180
127+
r'$a=-b-c$' # github issue #28180
128128
]
129129
# 'svgastext' tests switch svg output to embed text as text (rather than as
130130
# paths).

0 commit comments

Comments
 (0)