mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #3646 from jwilk/re.sub
Remove misplaced flags from re.sub() calls
This commit is contained in:
commit
9a7cd2a9ad
@ -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