diff options
| -rw-r--r-- | blog/models.py | 4 | ||||
| -rw-r--r-- | blog/tests.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/blog/models.py b/blog/models.py index eb97b2ac..06fcee6f 100644 --- a/blog/models.py +++ b/blog/models.py @@ -17,7 +17,7 @@ from markdown.extensions.toc import TocExtension, slugify as _md_title_slugify BLOG_DOCUTILS_SETTINGS = { "doctitle_xform": False, - "initial_header_level": 3, + "initial_header_level": 1, "id_prefix": "s-", "raw_enabled": False, "file_insertion_enabled": False, @@ -62,8 +62,8 @@ class ContentFormat(models.TextChoices): output_format="html", extensions=[ # baselevel matches `initial_header_level` from BLOG_DOCUTILS_SETTINGS - TocExtension(baselevel=3, slugify=_md_slugify), "tables", + TocExtension(baselevel=1, slugify=_md_slugify), ], ) raise ValueError(f"Unsupported format {fmt}") diff --git a/blog/tests.py b/blog/tests.py index 5b6b0ea6..87f3fc14 100644 --- a/blog/tests.py +++ b/blog/tests.py @@ -129,7 +129,7 @@ class EntryTestCase(DateTimeMixin, TestCase): content_format=ContentFormat.REST, ) self.assertHTMLEqual( - entry.body_html, '<div class="section" id="s-test"><h3>test</h3></div>' + entry.body_html, '<div class="section" id="s-test"><h1>test</h1></div>' ) def test_header_base_level_markdown(self): @@ -139,7 +139,7 @@ class EntryTestCase(DateTimeMixin, TestCase): body="# test", content_format=ContentFormat.MARKDOWN, ) - self.assertHTMLEqual(entry.body_html, '<h3 id="s-test">test</h3>') + self.assertHTMLEqual(entry.body_html, '<h1 id="s-test">test</h1>') def test_pub_date_localized(self): entry = Entry(pub_date=date(2005, 7, 21)) |
