check_for_shared_values#
- treescope.handlers.check_for_shared_values(node: Any, path: str | None, node_renderer: TreescopeSubtreeRenderer) → RenderableTreePart | RenderableAndLineAnnotations | NotImplementedType[source]#
Wrapper hook to check for and annotate shared values.
This wrapper should only be used by renderers that also include
build_styles_for_shared_values
in their HTML configuration andsetup_shared_value_context
in their context builders.- Parameters:
node – The node that has been rendered
path – Optionally, a path to this node as a string.
node_renderer – The inner renderer for this node. This should be used to render
node
itself into HTML tags.
- Returns:
A possibly-modified representation of this object.
- Raises:
RuntimeError – If called outside of the context constructed via setup_shared_value_context.