Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/markdown_it/rules_core/state_core.py: 93%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

14 statements  

1from __future__ import annotations 

2 

3from typing import TYPE_CHECKING 

4 

5from ..ruler import StateBase 

6from ..token import Token 

7from ..utils import EnvType 

8 

9if TYPE_CHECKING: 

10 from markdown_it import MarkdownIt 

11 

12 

13class StateCore(StateBase): 

14 def __init__( 

15 self, 

16 src: str, 

17 md: MarkdownIt, 

18 env: EnvType, 

19 tokens: list[Token] | None = None, 

20 ) -> None: 

21 self.src = src 

22 self.md = md # link to parser instance 

23 self.env = env 

24 self.tokens: list[Token] = tokens or [] 

25 self.inlineMode = False