MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / StateBase

Class StateBase

markdown_it/ruler.py:32–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32class StateBase:
33 def __init__(self, src: str, md: MarkdownIt, env: EnvType):
34 self.src = src
35 self.env = env
36 self.md = md
37
38 @property
39 def src(self) -> str:
40 return self._src
41
42 @src.setter
43 def src(self, value: str) -> None:
44 self._src = value
45 self._srcCharCode: tuple[int, ...] | None = None
46
47 @property
48 def srcCharCode(self) -> tuple[int, ...]:
49 warnings.warn(
50 "StateBase.srcCharCode is deprecated. Use StateBase.src instead.",
51 DeprecationWarning,
52 stacklevel=2,
53 )
54 if self._srcCharCode is None:
55 self._srcCharCode = tuple(ord(c) for c in self._src)
56 return self._srcCharCode
57
58
59class RuleOptionsType(TypedDict, total=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…