@@ -14,6 +14,7 @@ from markdown.treeprocessors import Treeprocessor
1414FN_BACKLINK_TEXT : str
1515NBSP_PLACEHOLDER : str
1616RE_REF_ID : Pattern [str ]
17+ RE_REFERENCE : Pattern [str ]
1718
1819class FootnoteExtension (Extension ):
1920 unique_prefix : int
@@ -22,11 +23,13 @@ class FootnoteExtension(Extension):
2223 def __init__ (self , ** kwargs ) -> None : ...
2324 parser : BlockParser
2425 md : Markdown
26+ footnote_order : list [str ]
2527 footnotes : OrderedDict [str , str ]
2628 def reset (self ) -> None : ...
2729 def unique_ref (self , reference : str , found : bool = False ) -> str : ...
2830 def findFootnotesPlaceholder (self , root : Element ) -> tuple [Element , Element , bool ] | None : ...
2931 def setFootnote (self , id : str , text : str ) -> None : ...
32+ def addFootnoteRef (self , id : str ) -> None : ...
3033 def get_separator (self ) -> str : ...
3134 def makeFootnoteId (self , id : str ) -> str : ...
3235 def makeFootnoteRefId (self , id : str , found : bool = False ) -> str : ...
@@ -49,11 +52,19 @@ class FootnotePostTreeprocessor(Treeprocessor):
4952 def add_duplicates (self , li : Element , duplicates : int ) -> None : ...
5053 def get_num_duplicates (self , li : Element ) -> int : ...
5154 def handle_duplicates (self , parent : Element ) -> None : ...
55+ def run (self , root : Element ) -> None : ...
5256 offset : int
5357
5458class FootnoteTreeprocessor (Treeprocessor ):
5559 footnotes : FootnoteExtension
5660 def __init__ (self , footnotes : FootnoteExtension ) -> None : ...
61+ def run (self , root : Element ) -> None : ...
62+
63+ class FootnoteReorderingProcessor (Treeprocessor ):
64+ footnotes : FootnoteExtension
65+ def __init__ (self , footnotes : FootnoteExtension ) -> None : ...
66+ def run (self , root : Element ) -> None : ...
67+ def reorder_footnotes (self , parent : Element ) -> None : ...
5768
5869class FootnotePostprocessor (Postprocessor ):
5970 footnotes : FootnoteExtension
0 commit comments