mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 16:31:04 +01:00
Correctly remove ## TODO section from proposals (#2207)
Fix bug introduced in #2139
This commit is contained in:
@@ -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,
|
||||
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"])
|
||||
|
||||
Reference in New Issue
Block a user