@@ -14,6 +14,7 @@ from markdown.treeprocessors import Treeprocessor
14
14
FN_BACKLINK_TEXT : str
15
15
NBSP_PLACEHOLDER : str
16
16
RE_REF_ID : Pattern [str ]
17
+ RE_REFERENCE : Pattern [str ]
17
18
18
19
class FootnoteExtension (Extension ):
19
20
unique_prefix : int
@@ -22,11 +23,13 @@ class FootnoteExtension(Extension):
22
23
def __init__ (self , ** kwargs ) -> None : ...
23
24
parser : BlockParser
24
25
md : Markdown
26
+ footnote_order : list [str ]
25
27
footnotes : OrderedDict [str , str ]
26
28
def reset (self ) -> None : ...
27
29
def unique_ref (self , reference : str , found : bool = False ) -> str : ...
28
30
def findFootnotesPlaceholder (self , root : Element ) -> tuple [Element , Element , bool ] | None : ...
29
31
def setFootnote (self , id : str , text : str ) -> None : ...
32
+ def addFootnoteRef (self , id : str ) -> None : ...
30
33
def get_separator (self ) -> str : ...
31
34
def makeFootnoteId (self , id : str ) -> str : ...
32
35
def makeFootnoteRefId (self , id : str , found : bool = False ) -> str : ...
@@ -49,11 +52,19 @@ class FootnotePostTreeprocessor(Treeprocessor):
49
52
def add_duplicates (self , li : Element , duplicates : int ) -> None : ...
50
53
def get_num_duplicates (self , li : Element ) -> int : ...
51
54
def handle_duplicates (self , parent : Element ) -> None : ...
55
+ def run (self , root : Element ) -> None : ...
52
56
offset : int
53
57
54
58
class FootnoteTreeprocessor (Treeprocessor ):
55
59
footnotes : FootnoteExtension
56
60
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 : ...
57
68
58
69
class FootnotePostprocessor (Postprocessor ):
59
70
footnotes : FootnoteExtension
0 commit comments