aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/Mammoth.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/Mammoth.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/Mammoth.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/zwobble/mammoth/Mammoth.java b/src/main/java/org/zwobble/mammoth/Mammoth.java
index b8dac98..d7f5679 100644
--- a/src/main/java/org/zwobble/mammoth/Mammoth.java
+++ b/src/main/java/org/zwobble/mammoth/Mammoth.java
@@ -31,7 +31,7 @@ public class Mammoth {
private final DocumentToHtmlOptions options;
public Mammoth() {
- this(DocumentToHtmlOptions.DEFAULT.styleMap(DefaultStyles.DEFAULT_STYLE_MAP));
+ this(DocumentToHtmlOptions.DEFAULT.addStyleMap(DefaultStyles.DEFAULT_STYLE_MAP));
}
private Mammoth(DocumentToHtmlOptions options) {
@@ -46,6 +46,10 @@ public class Mammoth {
return new Mammoth(options.preserveEmptyParagraphs());
}
+ public Mammoth addStyleMap(String styleMap) {
+ return new Mammoth(options.addStyleMap(styleMap));
+ }
+
public Result<String> convertToHtml(InputStream stream) throws IOException {
return withDocxFile(stream, zipFile ->
convertToHtml(Optional.empty(), zipFile));