Fix bug introduced in #2139
@@ -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
@@ -50,7 +50,9 @@ class TestNewProposal(unittest.TestCase):
"pull/123)" in 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"])