diff options
Diffstat (limited to 'htmtl/attribute_parsers')
| -rw-r--r-- | htmtl/attribute_parsers/__init__.py | 2 | ||||
| -rw-r--r-- | htmtl/attribute_parsers/inner_text.py | 13 | ||||
| -rw-r--r-- | htmtl/attribute_parsers/outer_text.py | 12 |
3 files changed, 0 insertions, 27 deletions
diff --git a/htmtl/attribute_parsers/__init__.py b/htmtl/attribute_parsers/__init__.py deleted file mode 100644 index 4ad8185..0000000 --- a/htmtl/attribute_parsers/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .inner_text import InnerText -from .outer_text import OuterText
\ No newline at end of file diff --git a/htmtl/attribute_parsers/inner_text.py b/htmtl/attribute_parsers/inner_text.py deleted file mode 100644 index 75ad01e..0000000 --- a/htmtl/attribute_parsers/inner_text.py +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Optional - -from dompa.nodes import Node, TextNode -from ..attribute_parser import AttributeParser - - -class InnerText(AttributeParser): - def traverse(self, node: Node) -> Optional[Node]: - if "inner-text" in node.attributes: - node.children = [TextNode(value=self.expression(node.attributes["inner-text"]))] - node.attributes.pop("inner-text") - - return node
\ No newline at end of file diff --git a/htmtl/attribute_parsers/outer_text.py b/htmtl/attribute_parsers/outer_text.py deleted file mode 100644 index 8e9bead..0000000 --- a/htmtl/attribute_parsers/outer_text.py +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Optional - -from dompa.nodes import Node, TextNode -from ..attribute_parser import AttributeParser - - -class OuterText(AttributeParser): - def traverse(self, node: Node) -> Optional[Node]: - if "outer-text" in node.attributes: - return TextNode(value=self.expression(node.attributes["outer-text"])) - - return node |
