MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / __init__

Method __init__

markdown/inlinepatterns.py:634–655  ·  view source on GitHub ↗

Initialize.

(
        self,
        token: str,
        tags: str,
        md: Markdown,
        smart: bool = False,
        double: bool = False
    )

Source from the content-addressed store, hash-verified

632 SPACE = re.compile(r'\s')
633
634 def __init__(
635 self,
636 token: str,
637 tags: str,
638 md: Markdown,
639 smart: bool = False,
640 double: bool = False
641 ) -> None:
642 """Initialize."""
643
644 md.delimiters = self
645 self.regions: list[tuple[int, int, int, int, tuple[str, str], int]] = []
646 # Unpaired delimiter. The entries are the same as `Delimiter.stack`.
647 self.stack: list[tuple[int, int, bool, int, int]] = []
648 self.tokens: list[str] = []
649 self.delimiters: dict[str, Delimiter] = {}
650 self.cache_index = 0
651 self.cache_pos = 0
652 self.md = md
653 # API for Markdown to pass `safe_mode` into instance
654 self.safe_mode = False
655 self.add(token, tags, smart, double)
656
657 def add(
658 self,

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected