# item_blocks

URL: /patitas/api/parsing/blocks/list/item_blocks/
Section: list
Description: Block element handling within list items.

Handles parsing of block elements (thematic breaks, fenced code, block quotes,
indented code) that appear within list items.

---

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

Open LLM text
(/patitas/api/parsing/blocks/list/item_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%2Flist%2Fitem_blocks%2Findex.txt)

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

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

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

Module

#
`parsing.blocks.list.item_blocks`

Block element handling within list items.

Handles parsing of block elements (thematic breaks, fenced code, block quotes,
indented code) that appear within list items.

5Functions

## Functions

`handle_thematic_break`

4

`tuple[Block | None, bool]`

▼

Handle a thematic break token within a list item.

`def handle_thematic_break(token: Token, saw_paragraph_content: bool, has_content_lines: bool, parser: ParserProtocol) -> tuple[Block | None, bool]`

##### Parameters

Name
Type
Description

`token`
`Token (/patitas/api/tokens/#Token)`

The THEMATIC_BREAK token

`saw_paragraph_content`
`bool`

Whether paragraph content was seen before this

`has_content_lines`
`bool`

Whether there are accumulated content lines

`parser`
`ParserProtocol`

The parser instance

##### Returns

`tuple[Block | None, bool]`

`handle_fenced_code_immediate`

5

`tuple[Block | None, bool]`

▼

Handle a fenced code block immediately after list marker.

`def handle_fenced_code_immediate(token: Token, saw_paragraph_content: bool, has_content_lines: bool, content_indent: int, parser: ParserProtocol) -> tuple[Block | None, bool]`

##### Parameters

Name
Type
Description

`token`
`Token (/patitas/api/tokens/#Token)`

The FENCED_CODE_START token

`saw_paragraph_content`
`bool`

Whether paragraph content was seen before this

`has_content_lines`
`bool`

Whether there are accumulated content lines

`content_indent`
`int`

Content indent for the list item

`parser`
`ParserProtocol`

The parser instance

##### Returns

`tuple[Block | None, bool]`

`parse_block_quote_from_indented_code`

3

`BlockQuote (/patitas/api/nodes/#BlockQuote)`

▼

Parse a block quote from INDENTED_CODE tokens.

Used when block quote markers a…

`def parse_block_quote_from_indented_code(start_token: Token, parser: ParserProtocol, check_indent: int) -> BlockQuote`

Parse a block quote from INDENTED_CODE tokens.

Used when block quote markers appear at content indent level within
list items, where the lexer produces INDENTED_CODE tokens.

##### Parameters

Name
Type
Description

`start_token`
`Token (/patitas/api/tokens/#Token)`

The first INDENTED_CODE token with block quote content

`parser`
`ParserProtocol`

The parser instance

`check_indent`
`int`

The content indent level

##### Returns

`BlockQuote (/patitas/api/nodes/#BlockQuote)`

`parse_fenced_code_from_indented_code`

3

`FencedCode (/patitas/api/nodes/#FencedCode)`

▼

Parse a fenced code block from INDENTED_CODE tokens.

Used when fenced code app…

`def parse_fenced_code_from_indented_code(start_token: Token, parser: ParserProtocol, check_indent: int) -> FencedCode`

Parse a fenced code block from INDENTED_CODE tokens.

Used when fenced code appears at content indent level within list items.

##### Parameters

Name
Type
Description

`start_token`
`Token (/patitas/api/tokens/#Token)`

The first INDENTED_CODE token with fence markers

`parser`
`ParserProtocol`

The parser instance

`check_indent`
`int`

The content indent level

##### Returns

`FencedCode (/patitas/api/nodes/#FencedCode)`

`parse_indented_code_in_list`

3

`IndentedCode (/patitas/api/nodes/#IndentedCode)`

▼

Parse an indented code block within a list item.

`def parse_indented_code_in_list(start_token: Token, parser: ParserProtocol, check_indent: int) -> IndentedCode`

##### Parameters

Name
Type
Description

`start_token`
`Token (/patitas/api/tokens/#Token)`

The first INDENTED_CODE token

`parser`
`ParserProtocol`

The parser instance

`check_indent`
`int`

The content indent level

##### Returns

`IndentedCode (/patitas/api/nodes/#IndentedCode)`
