Browse Source

context: current_figure

jk-bakalarka
Jiří Kalvoda 8 months ago
parent
commit
d783c7ae9c
  1. 5
      src/formatitko/transform_processor.py

5
src/formatitko/transform_processor.py

@ -326,7 +326,10 @@ class TransformProcessor(NOPProcessor):
else:
e.attributes["number"] = self.context.get_data("figure_number_generator")(e, self.context)
self.context.get_data("obj_map")[e.identifier] = e
return super().transform_Figure(e)
self.context.set_data("current_figure", e)
r = super().transform_Figure(e)
self.context.unset_data("current_figure")
return r
def transform_Link(self, e: Link) -> Link:
e = FLink(*e.content, url=e.url, identifier=e.identifier, attributes=e.attributes, classes=e.classes, obj_map=self.context.get_data("obj_map"))

Loading…
Cancel
Save