Skip to content

Commit 4fedcef

Browse files
committed
Fix rendering of markdown headers in docs
1 parent 0a31206 commit 4fedcef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bot/exts/info/doc/_markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def convert_li(self, el: PageElement, text: str, convert_as_inline: bool) -> str
3131
bullet = bullets[depth % len(bullets)]
3232
return f"{bullet} {text}\n"
3333

34-
def convert_hn(self, _n: int, el: PageElement, text: str, convert_as_inline: bool) -> str:
34+
def _convert_hn(self, _n: int, el: PageElement, text: str, convert_as_inline: bool) -> str:
3535
"""Convert h tags to bold text with ** instead of adding #."""
3636
if convert_as_inline:
3737
return text

tests/bot/exts/info/doc/test_parsing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def test_surrounding_whitespace(self):
9696
test_cases = (
9797
("<p>Hello World</p>", "Hello World"),
9898
("<p>Hello</p><p>World</p>", "Hello\n\nWorld"),
99+
("<h1>Title</h1>", "**Title**")
99100
)
100101
self._run_tests(test_cases)
101102

0 commit comments

Comments
 (0)