From 3788c89eada8b65dbfa47fefe2c64cfa74d04221 Mon Sep 17 00:00:00 2001 From: emerard <113128214+emerardd@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:35:19 +0800 Subject: [PATCH] fix(markdown): allow XML elements in HtmlStash --- stubs/Markdown/markdown/util.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stubs/Markdown/markdown/util.pyi b/stubs/Markdown/markdown/util.pyi index 82615ec3843f..567d279a9fb5 100644 --- a/stubs/Markdown/markdown/util.pyi +++ b/stubs/Markdown/markdown/util.pyi @@ -2,6 +2,7 @@ from collections.abc import Iterator from importlib import metadata from re import Pattern from typing import Final, Generic, TypedDict, TypeVar, overload, type_check_only +from xml.etree.ElementTree import Element from markdown.core import Markdown @@ -45,11 +46,11 @@ class _TagData(TypedDict): class HtmlStash: html_counter: int - rawHtmlBlocks: list[str] + rawHtmlBlocks: list[str | Element] tag_counter: int tag_data: list[_TagData] def __init__(self) -> None: ... - def store(self, html: str) -> str: ... + def store(self, html: str | Element) -> str: ... def reset(self) -> None: ... def get_placeholder(self, key: int) -> str: ... def store_tag(self, tag: str, attrs: dict[str, str], left_index: int, right_index: int) -> str: ...