Limitations
editMarkdown writes less than HTML. The conversion keeps the structure and the text of the converted elements, and loses the rest:
- Attributes and styles. Only
hrefandtitleof links,src,altandtitleof images, thestartof ordered lists, thecheckedstate of checkboxes, the alignment of table cells and the language of code blocks are read. Theclass,id,styleanddata-*attributes are lost, except on unknown elements written as raw HTML. - Fragments. Convert takes the content of a
body. A complete page gives itsheadelements as raw HTML: see Convert a complete document. - Whitespace. The whitespace of the text is collapsed, as a browser displays it. Only code blocks keep their line breaks and their indentation. CSS is not read: an element styled with
white-space: preis collapsed too. - Code. A code block or a code span keeps the text of its content, without its elements.
- Tables. A pipe table has one header row, and one line per row.
colspanandrowspanare ignored: a cell takes one column, and the shorter rows are completed with empty cells. Lists, code blocks and other blocks of a cell are flattened onto one line, separated by<br>. - Forms and media.
inputelements other than checkboxes are removed.video,audio,iframe,sub,sup,u,kbdand the other elements without a Markdown syntax are unknown elements: raw HTML, removed or unwrapped, depending onUnknownElementHandling. - Security. The converter is not a sanitizer: see Convert untrusted HTML.
The escapes are conservative: the Markdown can hold a backslash that is not needed, such as 1\.20 at the start of a table cell. It renders the same text.