html_to_markdown_converter#

scikitplot._externals._sphinx_ext._sphinx_ai_assistant.html_to_markdown_converter(html_content, strip_tags=None)[source]#

Convert an HTML string to Markdown using the Sphinx-tuned converter.

Parameters:
html_contentstr

Raw HTML string to convert.

strip_tagsstr or list of str or None, optional

HTML tag names whose elements (including all their content) are removed before conversion. A bare str is treated as a single-element list. Defaults to ["script", "style"] when None.

Returns:
str

Markdown representation of the HTML content.

Raises:
ImportError

If markdownify is not installed.

Parameters:
Return type:

str

Notes

bs4 is imported lazily inside this function. If it is not available the stripping step is skipped; markdownify’s own strip= option still removes the listed tags from the output.

Examples

>>> html_to_markdown("<h1>Hello</h1><p>World</p>")
'# Hello\n\nWorld\n\n'