diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-24 09:04:14 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-24 09:04:14 +0000 |
| commit | 8dd12c1ca7703a085b57fe4c5c35ef6e19d92134 (patch) | |
| tree | 2e2c47733e868a6a0deadceed8b1c564643bb2cc /src/main/java/org/zwobble/mammoth/Mammoth.java | |
| parent | 9903fc49d41142934012a5ec2bf16d80f0cf4b16 (diff) | |
Allow style maps to be added
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/Mammoth.java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/Mammoth.java | 6 |
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)); |
