File: block.py

package info (click to toggle)
markdown-it-py 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,780 kB
  • sloc: python: 5,214; xml: 39; sh: 29; makefile: 24
file content (13 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
from ..token import Token
from .state_core import StateCore


def block(state: StateCore) -> None:
    if state.inlineMode:
        token = Token("inline", "", 0)
        token.content = state.src
        token.map = [0, 1]
        token.children = []
        state.tokens.append(token)
    else:
        state.md.block.parse(state.src, state.md, state.env, state.tokens)