Classes
QuoteClassifierMixin
3
▼
Mixin providing block quote classification.
QuoteClassifierMixin
3
▼
Mixin providing block quote classification.
Methods
Internal Methods 3 ▼
_location_from
3
SourceLocation
▼
Get source location from saved position. Implemented by Lexer.
_location_from
3
SourceLocation
▼
def _location_from(self, start_pos: int, start_col: int | None = None, end_pos: int | None = None) -> SourceLocation
Parameters
| Name | Type | Description |
|---|---|---|
start_pos |
— |
|
start_col |
— |
Default:None
|
end_pos |
— |
Default:None
|
Returns
SourceLocation
_expand_tabs
2
str
▼
Expand tabs. Implemented by Lexer.
_expand_tabs
2
str
▼
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]
▼
Classify block quote marker and emit tokens.
_classify_block_quote
3
Iterator[Token]
▼
def _classify_block_quote(self, content: str, line_start: int, indent: int = 0) -> Iterator[Token]
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]