Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c604604

Browse files
committed
Fixes Bug #2969451: MathTextParser parse fails on nested brackets. Add test for this case.
svn path=/trunk/matplotlib/; revision=8297
1 parent 0b419ec commit c604604

11 files changed

Lines changed: 56 additions & 12 deletions

File tree

lib/matplotlib/mathtext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,8 +2295,9 @@ def __init__(self):
22952295
autoDelim <<(Suppress(Literal(r"\left"))
22962296
+ ((leftDelim | ambiDelim) | Error("Expected a delimiter"))
22972297
+ Group(
2298-
autoDelim
2299-
^ OneOrMore(simple))
2298+
OneOrMore(
2299+
autoDelim
2300+
^ simple))
23002301
+ Suppress(Literal(r"\right"))
23012302
+ ((rightDelim | ambiDelim) | Error("Expected a delimiter"))
23022303
)
40 Bytes
Binary file not shown.
1.16 KB
Loading

lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.svg

Lines changed: 17 additions & 3 deletions
Loading
Binary file not shown.
1.1 KB
Loading

lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.svg

Lines changed: 17 additions & 3 deletions
Loading
Binary file not shown.
1.08 KB
Loading

lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg

Lines changed: 17 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)