def is_inline(self, node): """Check whether a node represents an inline or block-level element""" return isinstance(node.parent, nodes.TextElement)