Correctly remove ## TODO section from proposals (#2207)

Fix bug introduced in #2139
This commit is contained in:
josh11b
2022-09-22 08:20:07 -07:00
committed by GitHub
parent 1dcd15380c
commit e941b90ac9
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ def _fill_template(template_path: str, title: str, pr_num: int) -> str:
r"\g<1>%d" % pr_num,
content,
)
content = re.sub(r"\n## TODO(?:|\n)*?(\n## )", r"\1", content)
content = re.sub(r"\n## TODO(?:.|\n)*?(\n## )", r"\1", content)
return content
+3 -1
View File
@@ -50,7 +50,9 @@ class TestNewProposal(unittest.TestCase):
"pull/123)" in content,
content,
)
self.assertTrue("\n## Abstract\n\n" in content, content)
self.assertTrue(
"<!-- tocstop -->\n\n## Abstract\n\n" in content, content
)
def test_run_success(self):
new_proposal._run(["true"])