mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove misplaced flags from re.sub() calls
The 4th argument of re.sub() is maximum number of substitutions, not flags. Moreover, re.MULTILINE affects only semantics of ^ and $, so it wouldn't have any effect on this regular expression.
This commit is contained in:
parent
f21ce2f03f
commit
79a841e98c
@ -587,7 +587,7 @@ def test_numfig_without_numbered_toctree_warn(app, warning):
|
||||
app.build()
|
||||
# remove :numbered: option
|
||||
index = (app.srcdir / 'index.rst').text()
|
||||
index = re.sub(':numbered:.*', '', index, re.MULTILINE)
|
||||
index = re.sub(':numbered:.*', '', index)
|
||||
(app.srcdir / 'index.rst').write_text(index, encoding='utf-8')
|
||||
app.builder.build_all()
|
||||
|
||||
@ -685,7 +685,7 @@ def test_numfig_without_numbered_toctree_warn(app, warning):
|
||||
def test_numfig_without_numbered_toctree(app, cached_etree_parse, fname, expect):
|
||||
# remove :numbered: option
|
||||
index = (app.srcdir / 'index.rst').text()
|
||||
index = re.sub(':numbered:.*', '', index, re.MULTILINE)
|
||||
index = re.sub(':numbered:.*', '', index)
|
||||
(app.srcdir / 'index.rst').write_text(index, encoding='utf-8')
|
||||
|
||||
if not app.outdir.listdir():
|
||||
|
Loading…
Reference in New Issue
Block a user