diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py index 47f8b59b21..43f8bc7248 100644 --- a/sphinx/util/smartypants.py +++ b/sphinx/util/smartypants.py @@ -155,7 +155,7 @@ def educateQuotes(text: str, language: str = 'en') -> str: # Special case for decade abbreviations (the '80s): if language.startswith('en'): # TODO similar cases in other languages? - text = re.sub(r"""'(?=\d{2}s)""", apostrophe, text, re.UNICODE) + text = re.sub(r"""'(?=\d{2}s)""", apostrophe, text, flags=re.UNICODE) close_class = r"""[^\ \t\r\n\[\{\(\-]""" dec_dashes = r"""–|—"""