@@ -18,9 +18,12 @@ class RichTextBlockWithFootnotes(RichTextBlock):
1818
1919 def __init__ (self , ** kwargs ):
2020 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" )
2225
23- def replace_footnote_tags (self , html , context = None ):
26+ def replace_footnote_tags (self , value , html , context = None ):
2427 if context is None :
2528 new_context = self .get_context (value )
2629 else :
@@ -49,12 +52,12 @@ def render(self, value, context=None):
4952 return self .render_basic (value , context = context )
5053
5154 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 )
5356
5457 def render_basic (self , value , context = None ):
5558 html = super ().render_basic (value , context )
5659
57- return self .replace_footnote_tags (html , context = context )
60+ return self .replace_footnote_tags (value , html , context = context )
5861
5962 def process_footnote (self , footnote_id , page ):
6063 footnote = self .footnotes [footnote_id ]
0 commit comments