Released: 2026-01-09
Initial release of Patitas, extracted from Bengal.
Highlights
- 🎉 First standalone release — Patitas is now a separate package
- ⚡ State-machine lexer — O(n) guaranteed, no ReDoS
- ✅ CommonMark 0.31.2 — Full specification compliance
- 🧵 Free-threading ready — Python 3.14t compatible
- 📦 Zero dependencies — Pure Python core
Features
Core Parser
- State-machine lexer with O(n) complexity
- Typed AST with frozen dataclasses
- Full CommonMark 0.31.2 compliance (652 tests)
Renderer
- HTML renderer with StringBuilder
- Zero-copy text extraction
- Pluggable syntax highlighter
- Pluggable icon resolver
Directives (Optional)
- MyST-style directive syntax
- Admonition directive
- Container directive
- Dropdown directive
- Tab set and tab item directives
- Directive contracts for nesting validation
API
parse()— Parse Markdown to ASTrender()— Render AST to HTMLMarkdown— All-in-one processor
Installation
pip install patitas
pip install patitas[directives] # With directives
pip install patitas[syntax] # With syntax highlighting
Breaking Changes
None — this is the initial release.
Known Issues
None reported.
Credits
Extracted from Bengal static site generator.