From 9c6e168c789437caabfb0e78474e34d5124019d7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 21 Feb 2016 21:11:54 +0000 Subject: Allow HTML path elements to have a choice of tag names --- .../java/org/zwobble/mammoth/styles/HtmlPathElement.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/zwobble/mammoth/styles/HtmlPathElement.java') diff --git a/src/main/java/org/zwobble/mammoth/styles/HtmlPathElement.java b/src/main/java/org/zwobble/mammoth/styles/HtmlPathElement.java index cfd20a6..541c6e7 100644 --- a/src/main/java/org/zwobble/mammoth/styles/HtmlPathElement.java +++ b/src/main/java/org/zwobble/mammoth/styles/HtmlPathElement.java @@ -11,24 +11,24 @@ import static org.zwobble.mammoth.util.MammothMaps.map; public class HtmlPathElement { public static HtmlPathElement fresh(String tagName) { - return new HtmlPathElement(tagName, map(), false); + return new HtmlPathElement(list(tagName), map(), false); } public static HtmlPathElement collapsible(String tagName) { - return new HtmlPathElement(tagName, map(), true); + return new HtmlPathElement(list(tagName), map(), true); } - private final String tagName; + private final List tagNames; private final Map attributes; private final boolean isCollapsible; - public HtmlPathElement(String tagName, Map attributes, boolean isCollapsible) { - this.tagName = tagName; + public HtmlPathElement(List tagNames, Map attributes, boolean isCollapsible) { + this.tagNames = tagNames; this.attributes = attributes; this.isCollapsible = isCollapsible; } public List wrap(List nodes) { - return list(new HtmlElement(list(tagName), attributes, nodes, isCollapsible)); + return list(new HtmlElement(tagNames, attributes, nodes, isCollapsible)); } } -- cgit v1.2.3