Documentation
¶
Overview ¶
Package html renders a doctree.Element into an HTML fragment.
This is a semantic-HTML-fragment writer, not a port of docutils' html5_polyglot writer (docutils' writers/_html_base.py + html5_polyglot/__init__.py total ~2300 lines and embed a full default CSS stylesheet, meta/doctype/head boilerplate, and CSS-class conventions Sphinx themes build on — replicating that byte-for-byte would be a second undertaking on the scale of the whole parser, for a stylesheet Sphinx doesn't even use — it has its own Jinja2 templates). SCOPE (v1): Render produces a BODY-CONTENT FRAGMENT only — no <!DOCTYPE>, <html>, <head>, or stylesheet; embedding it in a page is left to the caller. Tag choices follow docutils' html5_polyglot where there's an obvious correspondence (section/p/ul/ol/li/blockquote/ table/thead/tbody/tr, em/strong/code/cite/sub/sup/abbr), but CSS classes, ids, and other presentational attributes are NOT replicated — this parser doesn't run docutils' id-assignment pass, so there's nothing faithful to assign anyway.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.