mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 09:00:00 -06:00
Fix misplaced flags in re.sub() call
The 4th argument of re.sub() is maximum number of substitutions, not flags.
This commit is contained in:
1 parent
9f7c7a34db
commit
68729fb975
1 file changed
+1
-1
@@ -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"""–|—"""
|
||||
|
||||
Reference in new issue
Block a user