markdown_it.rules_block.state_block module

class markdown_it.rules_block.state_block.StateBlock(src: str, md: MarkdownIt, env, tokens: List[markdown_it.token.Token], srcCharCode: Optional[Tuple[int, ...]] = None)[源代码]

基类:markdown_it.ruler.StateBase

getLines(begin: int, end: int, indent: int, keepLastLF: bool) str[源代码]

Cut lines range from source.

isEmpty(line: int) bool[源代码]

.

push(ttype: str, tag: str, nesting: int) markdown_it.token.Token[源代码]

Push new token to “stream”.

skipChars(pos: int, code: int) int[源代码]

Skip char codes from given position.

skipCharsBack(pos: int, code: int, minimum: int) int[源代码]

Skip char codes reverse from given position - 1.

skipEmptyLines(from_pos: int) int[源代码]

.

skipSpaces(pos: int) int[源代码]

Skip spaces from given position.

skipSpacesBack(pos: int, minimum: int) int[源代码]

Skip spaces from given position in reverse.