Qu

html2md

Builtin index · Collections & strings

result = html2md(s)

Input: s · Output: result

What it is

s is a Str of HTML. Converts the same subset back to Markdown; malformed HTML degrades to its text rather than erroring.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = html2md(s)
s Strnot documented yet
result Str
Returns a Str.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

md = "# Title\n\nSome **bold** text."
html = md2html(md)
print(html)
print(html2md(html))
output
<h1>Title</h1>
<p>Some <strong>bold</strong> text.</p>

# Title

Some **bold** text.

from collections-strings