HyperlinkTarget

Contents

HyperlinkTarget#

class penzai.treescope.foldable_representation.foldable_impl.HyperlinkTarget[source]#

Bases: DeferringToChild

Wraps a node so that it can be targeted by a hyperlink.

Variables:
  • child (RenderableTreePart) – Child part to render.

  • keypath (tuple[Any, ...] | None) – Keypath to this node, which can be referenced by hyperlinks.

Inherited Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

Methods

__init__(child, keypath)

render_to_html(stream, *[, at_beginning_of_line])

Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

child

keypath

Inherited Methods

(expand to view inherited methods)

foldables_in_this_part()

html_setup_parts(context, /)

render_to_text(stream, *, expanded_parent, ...)