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