X7ROOT File Manager
Current Path:
/opt/alt/python311/lib/python3.11/site-packages/markdown_it
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
markdown_it
/
📁
..
📄
__init__.py
(113 B)
📁
__pycache__
📄
_compat.py
(246 B)
📄
_punycode.py
(2.31 KB)
📁
cli
📁
common
📁
helpers
📄
main.py
(12.47 KB)
📄
parser_block.py
(3.82 KB)
📄
parser_core.py
(1010 B)
📄
parser_inline.py
(4.88 KB)
📄
port.yaml
(2.39 KB)
📁
presets
📄
py.typed
(26 B)
📄
renderer.py
(9.74 KB)
📄
ruler.py
(8.98 KB)
📁
rules_block
📁
rules_core
📁
rules_inline
📄
token.py
(6.29 KB)
📄
tree.py
(11.15 KB)
📄
utils.py
(5.24 KB)
Editing: parser_core.py
""" * class Core * * Top-level rules executor. Glues block/inline parsers and does intermediate * transformations. """ from __future__ import annotations from typing import Callable from .ruler import Ruler from .rules_core import ( block, inline, linkify, normalize, replace, smartquotes, text_join, ) from .rules_core.state_core import StateCore RuleFuncCoreType = Callable[[StateCore], None] _rules: list[tuple[str, RuleFuncCoreType]] = [ ("normalize", normalize), ("block", block), ("inline", inline), ("linkify", linkify), ("replacements", replace), ("smartquotes", smartquotes), ("text_join", text_join), ] class ParserCore: def __init__(self) -> None: self.ruler = Ruler[RuleFuncCoreType]() for name, rule in _rules: self.ruler.push(name, rule) def process(self, state: StateCore) -> None: """Executes core chain rules.""" for rule in self.ruler.getRules(""): rule(state)
Upload File
Create Folder