Skip to content

Commit bcc2748

Browse files
committed
Don't add space before subscript / superscript.
1 parent 42e9b97 commit bcc2748

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/mathtext.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,7 @@ def function(self, s, loc, toks):
28792879
hlist_list = [Char(c, state) for c in toks[0]]
28802880
next_char = next((c for c in s[loc+len(toks[0])+1:] if c != ' '), '')
28812881
delimiters = self._left_delim | self._ambi_delim | self._right_delim
2882+
delimiters |= set(r"^_".split())
28822883
if (next_char not in delimiters and
28832884
toks[0] not in self._overunder_functions):
28842885
# Add thin space except when followed by parenthesis, bracket, etc.

0 commit comments

Comments
 (0)