context: current_figure
This commit is contained in:
parent
71e5c5bbdc
commit
d783c7ae9c
1 changed files with 4 additions and 1 deletions
|
@ -326,7 +326,10 @@ class TransformProcessor(NOPProcessor):
|
||||||
else:
|
else:
|
||||||
e.attributes["number"] = self.context.get_data("figure_number_generator")(e, self.context)
|
e.attributes["number"] = self.context.get_data("figure_number_generator")(e, self.context)
|
||||||
self.context.get_data("obj_map")[e.identifier] = e
|
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:
|
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"))
|
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…
Reference in a new issue