diff --git a/lib/matplotlib/_mathtext.py b/lib/matplotlib/_mathtext.py index 73e6163944e1..4292084abba9 100644 --- a/lib/matplotlib/_mathtext.py +++ b/lib/matplotlib/_mathtext.py @@ -15,7 +15,7 @@ from pyparsing import ( Combine, Empty, FollowedBy, Forward, Group, Literal, oneOf, OneOrMore, Optional, ParseBaseException, ParseFatalException, ParserElement, - ParseResults, QuotedString, Regex, StringEnd, Suppress, ZeroOrMore) + ParseResults, QuotedString, Regex, StringEnd, Suppress, White, ZeroOrMore) import matplotlib as mpl from . import _api, cbook @@ -2060,6 +2060,7 @@ def __init__(self): p.accent <<= Group( Suppress(p.bslash) + oneOf([*self._accent_map, *self._wide_accents]) + + Suppress(Optional(White())) - p.placeable ) diff --git a/requirements/doc/doc-requirements.txt b/requirements/doc/doc-requirements.txt index afb5c4105fae..c77787e4c72b 100644 --- a/requirements/doc/doc-requirements.txt +++ b/requirements/doc/doc-requirements.txt @@ -13,7 +13,6 @@ ipython ipywidgets numpydoc>=0.8 packaging>=20 -pyparsing<3.0.0 mpl-sphinx-theme sphinxcontrib-svg2pdfconverter>=1.1.0 sphinx-gallery>=0.10 diff --git a/requirements/testing/all.txt b/requirements/testing/all.txt index d11ac58331cc..fb7beef90f16 100644 --- a/requirements/testing/all.txt +++ b/requirements/testing/all.txt @@ -2,7 +2,6 @@ certifi coverage -pyparsing<3.0.0 pytest!=4.6.0,!=5.4.0 pytest-cov pytest-rerunfailures