# blocks

URL: /patitas/api/parsing/blocks/
Section: blocks
Description: Block parsing subsystem for Patitas parser.

Provides mixins for parsing block-level Markdown content:
- Headings (ATX and setext)
- Code blocks (fenced and indented)
- Block quotes
- Lists (ordered, unordered, task lists)
- Tables (GFM)
- Directives
- Footnote definitions
- Paragraphs

Architecture:
Block parsing is split into logical modules:
- core: Block dispatch and basic blocks
- list: Complex list parsing with nesting
- table: GFM table parsing
- directive: Directive parsing with contracts
- footnote: Footnote definition parsing

---

> For a complete page index, fetch /patitas/llms.txt.

Open LLM text
(/patitas/api/parsing/blocks/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Fparsing%2Fblocks%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Fparsing%2Fblocks%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Fparsing%2Fblocks%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Fparsing%2Fblocks%2Findex.txt)

Module

#
`parsing.blocks`

Block parsing subsystem for Patitas parser.

Provides mixins for parsing block-level Markdown content:

- Headings (ATX and setext)

- Code blocks (fenced and indented)

- Block quotes

- Lists (ordered, unordered, task lists)

- Tables (GFM)

- Directives

- Footnote definitions

- Paragraphs

Architecture:

Block parsing is split into logical modules:

- core: Block dispatch and basic blocks

- list: Complex list parsing with nesting

- table: GFM table parsing

- directive: Directive parsing with contracts

- footnote: Footnote definition parsing

1Class

## Classes

`BlockParsingMixin`

0

▼

Combined block parsing mixin.

Combines all block parsing functionality into a single mixin
that ca…

Bases:

`BlockParsingCoreMixin (/patitas/api/parsing/blocks/core/#BlockParsingCoreMixin)`,

`ListParsingMixin (/patitas/api/parsing/blocks/list/mixin/#ListParsingMixin)`,

`TableParsingMixin (/patitas/api/parsing/blocks/table/#TableParsingMixin)`,

`DirectiveParsingMixin (/patitas/api/parsing/blocks/directive/#DirectiveParsingMixin)`,

`FootnoteParsingMixin (/patitas/api/parsing/blocks/footnote/#FootnoteParsingMixin)`

Combined block parsing mixin.

Combines all block parsing functionality into a single mixin
that can be inherited by the Parser class.

Required Host Attributes:

- _source: str

- _tokens: list[Token]

- _pos: int

- _current: Token | None

- _tables_enabled: bool

- _directive_registry: DirectiveRegistry | None

- _directive_stack: list[str]

- _strict_contracts: bool

Required Host Methods:

- _at_end() -> bool

- _advance() -> Token | None

- _parse_inline(text, location) -> tuple[Inline, ...]
