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

Method build_double2

markdown/inlinepatterns.py:576–587  ·  view source on GitHub ↗

Return double tags (variant 2): ` text text `.

(self, m: re.Match[str], tags: str, idx: int)

Source from the content-addressed store, hash-verified

574 return el1
575
576 def build_double2(self, m: re.Match[str], tags: str, idx: int) -> etree.Element:
577 """Return double tags (variant 2): `<strong>text <em>text</em></strong>`."""
578
579 tag1, tag2 = tags.split(",")
580 el1 = etree.Element(tag1)
581 el2 = etree.Element(tag2)
582 text = m.group(2)
583 self.parse_sub_patterns(text, el1, None, idx)
584 text = m.group(3)
585 el1.append(el2)
586 self.parse_sub_patterns(text, el2, None, idx)
587 return el1
588
589 def parse_sub_patterns(
590 self, data: str, parent: etree.Element, last: etree.Element | None, idx: int

Callers 1

build_elementMethod · 0.95

Calls 1

parse_sub_patternsMethod · 0.95

Tested by

no test coverage detected