Expand description
MkDocs PyMdown extensions support
This module provides support for various PyMdown Markdown extensions commonly used with MkDocs Material:
- InlineHilite: Inline code highlighting
`#!python code` - Keys: Keyboard key notation
++ctrl+alt+delete++ - Caret: Superscript and insert
^superscript^and^^insert^^ - Tilde: Subscript and strikethrough
~subscript~and~~strike~~ - Mark: Highlight text
==highlighted== - SmartSymbols: Auto-replace symbols
(c)→©
§Architecture
All markup detection follows a consistent span-based pattern:
find_*_spans(line) -> Vec<(usize, usize)>- find byte rangesis_in_*(line, position) -> bool- check if position is inside markup
For double-takes-precedence patterns (caret: ^^/^, tilde: ~~/~):
- Double-delimiter spans are found first
- Single-delimiter spans exclude positions inside double spans
§References
Functions§
- is_
in_ mark - Check if a position is within mark markup
- is_
in_ pymdown_ markup - Check if a position is within any PyMdown extension markup
- is_
inline_ hilite_ content - Check if code span content starts with InlineHilite shebang