diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-21 10:09:47 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-21 10:09:47 +0000 |
| commit | 8377b89bfc97a85dbe90fb4cfa5dd33cd3568af4 (patch) | |
| tree | c37ec926bfb9cf2c45ebfb564edb596fa1e0965a /src/main/java/org/zwobble/mammoth/Mammoth.java | |
| parent | c1604e510cc831a00f6105df35c68a856f061b65 (diff) | |
Add style mappings for runs
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/Mammoth.java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/Mammoth.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/zwobble/mammoth/Mammoth.java b/src/main/java/org/zwobble/mammoth/Mammoth.java index 4963c3a..e89e282 100644 --- a/src/main/java/org/zwobble/mammoth/Mammoth.java +++ b/src/main/java/org/zwobble/mammoth/Mammoth.java @@ -11,10 +11,7 @@ import org.zwobble.mammoth.docx.InMemoryDocxFile; import org.zwobble.mammoth.docx.ZippedDocxFile; import org.zwobble.mammoth.html.Html; import org.zwobble.mammoth.results.Result; -import org.zwobble.mammoth.styles.HtmlPath; -import org.zwobble.mammoth.styles.HtmlPathElement; -import org.zwobble.mammoth.styles.ParagraphMatcher; -import org.zwobble.mammoth.styles.StyleMap; +import org.zwobble.mammoth.styles.*; import org.zwobble.mammoth.util.Casts; import java.io.File; @@ -51,9 +48,14 @@ public class Mammoth { private static final StyleMap DEFAULT_STYLE_MAP = StyleMap.builder() .mapParagraph(ParagraphMatcher.styleName("footnote text"), HtmlPath.element("p")) + .mapRun(RunMatcher.styleName("footnote reference"), HtmlPath.EMPTY) .mapParagraph(ParagraphMatcher.styleName("endnote text"), HtmlPath.element("p")) + .mapRun(RunMatcher.styleName("endnote reference"), HtmlPath.EMPTY) + .mapParagraph(ParagraphMatcher.styleName("Footnote"), HtmlPath.element("p")) + .mapRun(RunMatcher.styleName("Footnote anchor"), HtmlPath.EMPTY) .mapParagraph(ParagraphMatcher.styleName("Endnote"), HtmlPath.element("p")) + .mapRun(RunMatcher.styleName("Endnote anchor"), HtmlPath.EMPTY) .mapParagraph( ParagraphMatcher.unorderedList("0"), @@ -61,6 +63,7 @@ public class Mammoth { HtmlPathElement.collapsible("ul"), HtmlPathElement.fresh("li")))) + .mapRun(RunMatcher.styleName("Hyperlink"), HtmlPath.EMPTY) .mapParagraph(ParagraphMatcher.styleName("Normal"), HtmlPath.element("p")) .build(); |
