aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_paths.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-12 22:22:16 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-12 22:22:16 +0000
commit2791c74b8c1afc1014e380111b7e7f4d4ea09539 (patch)
tree966d0718caa3522eb2477d1f64558ff7085d19a6 /mammoth/html_paths.py
parenteab369b5721b933c080516fd1dcdfa67e6e2dfcd (diff)
Read :fresh on HTML path elements
Diffstat (limited to 'mammoth/html_paths.py')
-rw-r--r--mammoth/html_paths.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mammoth/html_paths.py b/mammoth/html_paths.py
index 0f2184d..887288b 100644
--- a/mammoth/html_paths.py
+++ b/mammoth/html_paths.py
@@ -5,11 +5,13 @@ def path(elements):
return HtmlPath(elements)
-def element(names, class_names=None):
+def element(names, class_names=None, fresh=None):
if class_names is None:
class_names = []
- return HtmlPathElement(names, class_names)
+ if fresh is None:
+ fresh = False
+ return HtmlPathElement(names, class_names, fresh)
HtmlPath = collections.namedtuple("HtmlPath", ["elements"])
-HtmlPathElement = collections.namedtuple("HtmlPathElement", ["names", "class_names"])
+HtmlPathElement = collections.namedtuple("HtmlPathElement", ["names", "class_names", "fresh"])