Skip to content

Commit d84a8cf

Browse files
authored
[Markdown] Allow XML elements in HtmlStash (#16486)
1 parent 0b28ac8 commit d84a8cf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎stubs/Markdown/markdown/util.pyi‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from collections.abc import Iterator
22
from importlib import metadata
33
from re import Pattern
44
from typing import Final, Generic, TypedDict, TypeVar, overload, type_check_only
5+
from xml.etree.ElementTree import Element
56

67
from markdown.core import Markdown
78

@@ -45,11 +46,11 @@ class _TagData(TypedDict):
4546

4647
class HtmlStash:
4748
html_counter: int
48-
rawHtmlBlocks: list[str]
49+
rawHtmlBlocks: list[str | Element]
4950
tag_counter: int
5051
tag_data: list[_TagData]
5152
def __init__(self) -> None: ...
52-
def store(self, html: str) -> str: ...
53+
def store(self, html: str | Element) -> str: ...
5354
def reset(self) -> None: ...
5455
def get_placeholder(self, key: int) -> str: ...
5556
def store_tag(self, tag: str, attrs: dict[str, str], left_index: int, right_index: int) -> str: ...

0 commit comments

Comments
 (0)