roundtrip_condition#
- treescope.rendering_parts.roundtrip_condition(roundtrip: RenderableTreePart | None = None, not_roundtrip: RenderableTreePart | None = None) RenderableTreePart [source]#
Builds a part that renders differently in roundtrip mode.
- Parameters:
roundtrip – Contents to render when rendering in round trip mode.
not_roundtrip – Contents to render when renderingin ordinary mode.
- Returns:
A renderable part that renders as
roundtrip
in roundtrip mode and asnot_roundtrip
in ordinary mode.