Merge b9205f2b6b into 041be54471
This commit is contained in:
commit
8078790943
1 changed files with 13 additions and 0 deletions
|
|
@ -107,5 +107,18 @@ class _CustomMarkdownify(markdownify.MarkdownConverter):
|
||||||
|
|
||||||
return "" % (alt, src, title_part)
|
return "" % (alt, src, title_part)
|
||||||
|
|
||||||
|
def convert_input(
|
||||||
|
self,
|
||||||
|
el: Any,
|
||||||
|
text: str,
|
||||||
|
convert_as_inline: Optional[bool] = False,
|
||||||
|
**kwargs,
|
||||||
|
) -> str:
|
||||||
|
"""Convert checkboxes to Markdown [x]/[ ] syntax."""
|
||||||
|
|
||||||
|
if el.get("type") == "checkbox":
|
||||||
|
return "[x] " if el.has_attr("checked") else "[ ] "
|
||||||
|
return ""
|
||||||
|
|
||||||
def convert_soup(self, soup: Any) -> str:
|
def convert_soup(self, soup: Any) -> str:
|
||||||
return super().convert_soup(soup) # type: ignore
|
return super().convert_soup(soup) # type: ignore
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue