From be948eaca5ee0a94c2a54b3e72922e1e6865865f Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 4 Sep 2025 20:45:03 -0400 Subject: [PATCH] [Markdown] Update to 3.9.* --- stubs/Markdown/METADATA.toml | 2 +- stubs/Markdown/markdown/extensions/footnotes.pyi | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stubs/Markdown/METADATA.toml b/stubs/Markdown/METADATA.toml index 01a67268ef5d..9a121e5aeb0d 100644 --- a/stubs/Markdown/METADATA.toml +++ b/stubs/Markdown/METADATA.toml @@ -1,2 +1,2 @@ -version = "3.8.*" +version = "3.9.*" upstream_repository = "https://github.com/Python-Markdown/markdown" diff --git a/stubs/Markdown/markdown/extensions/footnotes.pyi b/stubs/Markdown/markdown/extensions/footnotes.pyi index f145ffdeb87e..f1535eb79140 100644 --- a/stubs/Markdown/markdown/extensions/footnotes.pyi +++ b/stubs/Markdown/markdown/extensions/footnotes.pyi @@ -14,6 +14,7 @@ from markdown.treeprocessors import Treeprocessor FN_BACKLINK_TEXT: str NBSP_PLACEHOLDER: str RE_REF_ID: Pattern[str] +RE_REFERENCE: Pattern[str] class FootnoteExtension(Extension): unique_prefix: int @@ -22,11 +23,13 @@ class FootnoteExtension(Extension): def __init__(self, **kwargs) -> None: ... parser: BlockParser md: Markdown + footnote_order: list[str] footnotes: OrderedDict[str, str] def reset(self) -> None: ... def unique_ref(self, reference: str, found: bool = False) -> str: ... def findFootnotesPlaceholder(self, root: Element) -> tuple[Element, Element, bool] | None: ... def setFootnote(self, id: str, text: str) -> None: ... + def addFootnoteRef(self, id: str) -> None: ... def get_separator(self) -> str: ... def makeFootnoteId(self, id: str) -> str: ... def makeFootnoteRefId(self, id: str, found: bool = False) -> str: ... @@ -49,11 +52,19 @@ class FootnotePostTreeprocessor(Treeprocessor): def add_duplicates(self, li: Element, duplicates: int) -> None: ... def get_num_duplicates(self, li: Element) -> int: ... def handle_duplicates(self, parent: Element) -> None: ... + def run(self, root: Element) -> None: ... offset: int class FootnoteTreeprocessor(Treeprocessor): footnotes: FootnoteExtension def __init__(self, footnotes: FootnoteExtension) -> None: ... + def run(self, root: Element) -> None: ... + +class FootnoteReorderingProcessor(Treeprocessor): + footnotes: FootnoteExtension + def __init__(self, footnotes: FootnoteExtension) -> None: ... + def run(self, root: Element) -> None: ... + def reorder_footnotes(self, parent: Element) -> None: ... class FootnotePostprocessor(Postprocessor): footnotes: FootnoteExtension