MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / is_nested

Method is_nested

markdown_it/tree.py:132–139  ·  view source on GitHub ↗

Is this node nested?. Returns `True` if the node represents a `Token` pair and tokens in the sequence between them, where `Token.nesting` of the first `Token` in the pair is 1 and nesting of the other `Token` is -1.

(self)

Source from the content-addressed store, hash-verified

130
131 @property
132 def is_nested(self) -> bool:
133 """Is this node nested?.
134
135 Returns `True` if the node represents a `Token` pair and tokens in the
136 sequence between them, where `Token.nesting` of the first `Token` in
137 the pair is 1 and nesting of the other `Token` is -1.
138 """
139 return bool(self.nester_tokens)
140
141 @property
142 def siblings(self: _NodeType) -> Sequence[_NodeType]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected