Packages
Directive system for Patitas. Provides extensible block-level markup through the directive...
Modular state-machine lexer for Patitas markdown parser. This package provides a window-based lexer with O(n)...
Parsing subsystem for Patitas Markdown parser. Provides mixin classes for modular parsing functionality: -...
Plugin system for Patitas Markdown parser. Plugins extend Patitas with additional syntax support: - table:...
Patitas renderers.
Role system for Patitas. Provides extensible inline markup through the role syntax: {role}`content` Roles are the...
Utility modules for Patitas.
Modules
Content-addressed parse cache for Patitas. Provides (content_hash, config_hash) -> Document caching to avoid...
ContextVar-based parse configuration for Patitas. Provides thread-local configuration using Python's ContextVars...
Content-aware context mapping for Patitas AST nodes. Maps AST node types to the template context paths they affect.
AST differ — structural diff on Patitas frozen ASTs. Compares two Patitas Document trees and produces a changeset...
Exception classes for Patitas.
Extract plain-text excerpts from Patitas AST. Provides structurally correct excerpt extraction that stops at block...
Syntax highlighting protocol and injection for Patitas. Provides optional syntax highlighting for code blocks. When...
Icon resolver protocol and injection for Patitas. Provides optional icon support for directives.
Incremental re-parsing for Patitas ASTs. When a user edits one paragraph, only that paragraph's region...
Source location tracking for error messages and debugging.
Typed AST nodes for Patitas.
Jupyter notebook (.ipynb) parser for Patitas. Parses nbformat 4.x JSON to (markdown_content, metadata) in the same...
Recursive descent parser producing typed AST.
Patitas — Modern Markdown Parser for Python 3.14t A CommonMark-compliant Markdown parser designed for free-threaded...
Patitas ParseAccumulator — opt-in profiling for Markdown parsing.
Protocols for Patitas.
AST serialization — JSON round-trip for Patitas AST nodes. Converts typed AST nodes to/from JSON-compatible dicts.
StringBuilder for O(n) string accumulation.
Token and TokenType definitions for the Patitas lexer. The lexer produces a stream of Token objects that the parser...
AST Visitor and Transformer for Patitas. Provides a base visitor class with match-based dispatch and an...