Skip to content

Commit

Permalink
Merge pull request matplotlib#5882 from zblz/edge-comma-dots
Browse files Browse the repository at this point in the history
mathtext: Fix comma behaviour at start of string
  • Loading branch information
mdboom authored and QuLogic committed Oct 16, 2016
1 parent f9cb9cf commit b04c5b9
Show file tree
Hide file tree
Showing 17 changed files with 296 additions and 228 deletions.
3 changes: 2 additions & 1 deletion lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2656,11 +2656,12 @@ def symbol(self, s, loc, toks):

# Do not space commas between brackets
if c == ',':
prev_char, next_char = '', ''
for i in six.moves.xrange(1, loc + 1):
prev_char = s[loc - i]
if prev_char != ' ':
break
for i in six.moves.xrange(1, loc + 1):
for i in six.moves.xrange(1, len(s) - loc):
next_char = s[loc + i]
if next_char != ' ':
break
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 64 additions & 49 deletions lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b04c5b9

Please sign in to comment.