# quote

URL: /patitas/api/lexer/classifiers/quote/
Section: classifiers
Description: Block quote classifier mixin.

---

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

Open LLM text
(/patitas/api/lexer/classifiers/quote/index.txt)

Share with AI

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

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

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

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

Module

#
`lexer.classifiers.quote`

Block quote classifier mixin.

1Class

## Classes

`QuoteClassifierMixin`

3

▼

Mixin providing block quote classification.

Mixin providing block quote classification.

#### Methods

Internal Methods
3

▼

`_make_token`

6

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

▼

Create token with raw coordinates. Implemented by Lexer.

`def _make_token(self, token_type: TokenType, value: str, start_pos: int, *, start_col: int | None = None, end_pos: int | None = None, line_indent: int = -1) -> Token`

##### Parameters

Name
Type
Description

`token_type`
`—`

`value`
`—`

`start_pos`
`—`

`start_col`
`—`

Default:`None`

`end_pos`
`—`

Default:`None`

`line_indent`
`—`

Default:`-1`

##### Returns

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

`_expand_tabs`

2

`str`

▼

Expand tabs. Implemented by Lexer.

`def _expand_tabs(self, text: str, start_col: int = 1) -> str`

##### Parameters

Name
Type
Description

`text`
`—`

`start_col`
`—`

Default:`1`

##### Returns

`str`

`_classify_block_quote`

3

`Iterator[Token (/patitas/api/tokens/#Token)]`

▼

Classify block quote marker(s) and emit tokens.

A single line may carry many n…

`def _classify_block_quote(self: LexerClassifierHost, content: str, line_start: int, indent: int = 0) -> Iterator[Token]`

Classify block quote marker(s) and emit tokens.

A single line may carry many nested`>` markers (`> > > x`). Each marker
is emitted as a`BLOCK_QUOTE_MARKER`token; the innermost content is then
classified once.

This is written as a LOOP rather than tail recursion. The original recursive
form crashed with a`RecursionError`in the lexer on adversarial single-line
input (hundreds of leading`>`) BEFORE the parser's `max_nesting_depth` (/patitas/api/config/#ParseConfig)
guard could fire. Iterating peels one`>`per pass and emits identical
tokens (same marker offsets,`start_col`, `line_indent` (/patitas/api/tokens/#Token), and the same
nested heading/list/fence/link-ref/thematic-break handling).

##### Parameters

Name
Type
Description

`content`
`—`

Content starting with >

`line_start`
`—`

Absolute offset of the start of the line

`indent`
`—`

Column position of the > marker (0-indexed)

Default:`0`

##### Returns

`Iterator[Token (/patitas/api/tokens/#Token)]`
