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

Method next_sibling

markdown_it/tree.py:168–176  ·  view source on GitHub ↗

Get the next node in the sequence of siblings. Returns `None` if this is the last sibling.

(self: _NodeType)

Source from the content-addressed store, hash-verified

166
167 @property
168 def next_sibling(self: _NodeType) -> _NodeType | None:
169 """Get the next node in the sequence of siblings.
170
171 Returns `None` if this is the last sibling.
172 """
173 self_index = self.siblings.index(self)
174 if self_index + 1 < len(self.siblings):
175 return self.siblings[self_index + 1]
176 return None
177
178 @property
179 def previous_sibling(self: _NodeType) -> _NodeType | None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected