prevent very large headline prefixes

for example: `<h9999999>` could crash the conversion.

fixes #143
This commit is contained in:
AlexVonB
2024-11-24 21:11:42 +01:00
parent fe8a821a20
commit 9595618796
2 changed files with 4 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ def test_hn():
assert md('<h4>Hello</h4>') == '\n#### Hello\n\n'
assert md('<h5>Hello</h5>') == '\n##### Hello\n\n'
assert md('<h6>Hello</h6>') == '\n###### Hello\n\n'
assert md('<h10>Hello</h10>') == md('<h6>Hello</h6>')
def test_hn_chained():