Module

parsing.blocks.footnote

Footnote parsing for Patitas parser.

Handles footnote definition parsing.

Classes

FootnoteParsingMixin 5 ▼
Mixin for footnote definition parsing. Required Host Attributes: - _current: Token | None Req…

Mixin for footnote definition parsing.

Required Host Attributes:

  • _current: Token | None

Required Host Methods:

  • _at_end() -> bool
  • _advance() -> Token | None
  • _parse_inline(text, location) -> tuple[Inline, ...]

Attributes

Name Type Description
_current Token | None —

Methods

Internal Methods 4 ▼
_at_end 0 bool ▼
Check if at end of token stream. Implemented by TokenNavigationMixin.
def _at_end(self) -> bool
Returns
bool
_advance 0 Token | None ▼
Advance to next token. Implemented by TokenNavigationMixin.
def _advance(self) -> Token | None
Returns
Token | None
_parse_inline 2 tuple[Inline, ...] ▼
Parse inline content. Implemented by InlineParser.
def _parse_inline(self, text: str, location: object) -> tuple[Inline, ...]
Parameters
Name Type Description
text —
location —
Returns
tuple[Inline, ...]
_parse_footnote_def 0 FootnoteDef ▼
Parse footnote definition. Format: [^identifier]: content Token value format: …
def _parse_footnote_def(self) -> FootnoteDef

Parse footnote definition.

Format: [^identifier]: content Token value format: identifier:content

Returns
FootnoteDef