Skip to content

Commit

Permalink
Fix rendering of markdown headers in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wookie184 committed Dec 30, 2024
1 parent 0a31206 commit 4fedcef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bot/exts/info/doc/_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def convert_li(self, el: PageElement, text: str, convert_as_inline: bool) -> str
bullet = bullets[depth % len(bullets)]
return f"{bullet} {text}\n"

def convert_hn(self, _n: int, el: PageElement, text: str, convert_as_inline: bool) -> str:
def _convert_hn(self, _n: int, el: PageElement, text: str, convert_as_inline: bool) -> str:
"""Convert h tags to bold text with ** instead of adding #."""
if convert_as_inline:
return text
Expand Down
1 change: 1 addition & 0 deletions tests/bot/exts/info/doc/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def test_surrounding_whitespace(self):
test_cases = (
("<p>Hello World</p>", "Hello World"),
("<p>Hello</p><p>World</p>", "Hello\n\nWorld"),
("<h1>Title</h1>", "**Title**")
)
self._run_tests(test_cases)

Expand Down

0 comments on commit 4fedcef

Please sign in to comment.