@@ -18,9 +18,12 @@ class RichTextBlockWithFootnotes(RichTextBlock):
18
18
19
19
def __init__ (self , ** kwargs ):
20
20
super ().__init__ (** kwargs )
21
- self .features += "footnotes"
21
+ if not self .features :
22
+ self .features = []
23
+ if "footnotes" not in self .features :
24
+ self .features .append ("footnotes" )
22
25
23
- def replace_footnote_tags (self , html , context = None ):
26
+ def replace_footnote_tags (self , value , html , context = None ):
24
27
if context is None :
25
28
new_context = self .get_context (value )
26
29
else :
@@ -49,12 +52,12 @@ def render(self, value, context=None):
49
52
return self .render_basic (value , context = context )
50
53
51
54
html = super ().render (value , context = context )
52
- return self .replace_footnote_tags (html , context = context )
55
+ return self .replace_footnote_tags (value , html , context = context )
53
56
54
57
def render_basic (self , value , context = None ):
55
58
html = super ().render_basic (value , context )
56
59
57
- return self .replace_footnote_tags (html , context = context )
60
+ return self .replace_footnote_tags (value , html , context = context )
58
61
59
62
def process_footnote (self , footnote_id , page ):
60
63
footnote = self .footnotes [footnote_id ]
0 commit comments