From 2791c74b8c1afc1014e380111b7e7f4d4ea09539 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 12 Dec 2013 22:22:16 +0000 Subject: Read :fresh on HTML path elements --- mammoth/html_paths.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mammoth/html_paths.py') 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"]) -- cgit v1.2.3