Skip to main content

Module mkdocs_html_markdown

Module mkdocs_html_markdown 

Source
Expand description

HTML with a markdown attribute detection

Both Python-Markdown’s md_in_html extension (MkDocs) and kramdown (Jekyll) let an element opt its content into Markdown parsing with a markdown attribute:

  • <div class="grid cards" markdown> - Material grid cards
  • <div markdown="1">, <details markdown="block">, <div markdown="span">
  • <p markdown="1"> and <h5 markdown="1"> - common in Jekyll docs

<div markdown="0"> is kramdown’s opposite and declares the content to be raw HTML, so it does not open a block here.

Structs§

MarkdownHtmlTracker
Track state for markdown HTML block parsing

Enums§

MarkdownContent
How an element with a markdown attribute reads its content.

Functions§

closes_markdown_element
Whether the line is the closing tag of an element that can declare its content to be Markdown.
mentions_markdown
Whether text contains the word “markdown” in any letter case, the spelling range scan_markdown_open_tag accepts for the attribute name.
opens_markdown_block_alone
Whether the line holds nothing but the opening tag of an element that declares block Markdown content, so the content starts on the next line.