You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
markdownify in ./.venv/lib/python3.8/site-packages (0.13.1)
The issue is found with atheris library
Code to reproduce markdownify("<hn>")
The error is:
Traceback (most recent call last):
File "/home/redacted/code/other/atheris/pythonProject/test_unit_009-1.py", line 26, in <module>
markdownify("<hn>")
File "/home/redacted/code/other/atheris/pythonProject/.venv/lib/python3.8/site-packages/markdownify/__init__.py", line 433, in markdownify
return MarkdownConverter(**options).convert(html)
File "/home/redacted/code/other/atheris/pythonProject/.venv/lib/python3.8/site-packages/markdownify/__init__.py", line 105, in convert
return self.convert_soup(soup)
File "/home/redacted/code/other/atheris/pythonProject/.venv/lib/python3.8/site-packages/markdownify/__init__.py", line 108, in convert_soup
return self.process_tag(soup, convert_as_inline=False, children_only=True)
File "/home/redacted/code/other/atheris/pythonProject/.venv/lib/python3.8/site-packages/markdownify/__init__.py", line 151, in process_tag
text += self.process_tag(el, convert_children_as_inline)
File "/home/redacted/code/other/atheris/pythonProject/.venv/lib/python3.8/site-packages/markdownify/__init__.py", line 156, in process_tag
text = convert_fn(node, text, convert_as_inline)
TypeError: convert_hn() missing 1 required positional argument: 'convert_as_inline'
Activity
Ronak-Ronu commentedon Sep 26, 2024
Implement error handling to catch this specific TypeError. For example:
AlexVonB commentedon Nov 24, 2024
Thanks for finding this!
prevent `<hn>` to call convert_hn and crash
prevent `<hn>` to call convert_hn and crash