In my patch of MsytParser I like to overwrite the standard behavior of the hmtl Translator in sphinx for the formation of the image node.
# override only the html writer visit methods for image,
# to react on image-link classes
app.add_node(
nodes.image,
override=True,
html=(visit_image_html, depart_image_html),
)
This overwrite works well, the overwriting function is called.
The overwriting function is here and it should do nothing but call the original bahavior.
# This will become the overwrite
def visit_image_html(self, node: nodes.Node):
return self.visit_image(node)
But how do I call the standard behavior? The above version leads as expected to an infinite recursion.
def visit_image_html(self, node: nodes.Node):
return super(self).visit_image(node)
Does not work either.
Any help is truly appreciated.
Cheers,
Volker