Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b04c5b9

Browse filesBrowse files
mdboomQuLogic
authored andcommitted
Merge pull request #5882 from zblz/edge-comma-dots
mathtext: Fix comma behaviour at start of string
1 parent f9cb9cf commit b04c5b9
Copy full SHA for b04c5b9
Expand file treeCollapse file tree

17 files changed

+296
-228
lines changed

‎lib/matplotlib/mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mathtext.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,11 +2656,12 @@ def symbol(self, s, loc, toks):
26562656

26572657
# Do not space commas between brackets
26582658
if c == ',':
2659+
prev_char, next_char = '', ''
26592660
for i in six.moves.xrange(1, loc + 1):
26602661
prev_char = s[loc - i]
26612662
if prev_char != ' ':
26622663
break
2663-
for i in six.moves.xrange(1, loc + 1):
2664+
for i in six.moves.xrange(1, len(s) - loc):
26642665
next_char = s[loc + i]
26652666
if next_char != ' ':
26662667
break
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_80.svg
+64-49Lines changed: 64 additions & 49 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_80.svg
+52-42Lines changed: 52 additions & 42 deletions
Loading
Binary file not shown.
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.