Pin a #-prefixed prose line as body in the sections test

This commit is contained in:
2026-09-24 23:54:36 +02:00
parent 6492cd62a1
commit 49da0a1c3b
+2 -2
View File
@@ -27,8 +27,8 @@ def human(content):
class Sections(unittest.TestCase):
def test_keeps_only_headed_sections_with_a_body(self):
text = "# Title\n\nintro\n\n## Goals\n\n1. one\n```sh\n# not a heading\n```\n### Later\n2. two\n\n## Empty\n\n## Audience\nme\n# Appendix\nnot audience\n"
self.assertEqual(loop.sections(text), {"Goals": "1. one\n```sh\n# not a heading\n```\n### Later\n2. two", "Audience": "me"})
text = "# Title\n\nintro\n\n## Goals\n\n1. one\n```sh\n# not a heading\n```\n### Later\n2. two\n#1 priority\n\n## Empty\n\n## Audience\nme\n# Appendix\nnot audience\n"
self.assertEqual(loop.sections(text), {"Goals": "1. one\n```sh\n# not a heading\n```\n### Later\n2. two\n#1 priority", "Audience": "me"})
class Render(unittest.TestCase):