diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-08-29 11:37:27 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-08-29 11:37:27 +0100 |
| commit | 955a29e828d40123ec64a479b1c4c5164db3c681 (patch) | |
| tree | a83a65b91bd02c753789f5b57fd68bfbc446c5aa /src/test/java/org/zwobble/mammoth/tests/MammothTests.java | |
| parent | 28c8b89afea499191b13849140354b21819937f4 (diff) | |
Wire up comment conversion code
Diffstat (limited to 'src/test/java/org/zwobble/mammoth/tests/MammothTests.java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/MammothTests.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java index 455fa0c..fff4cb3 100644 --- a/src/test/java/org/zwobble/mammoth/tests/MammothTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/MammothTests.java @@ -155,6 +155,19 @@ public class MammothTests { } @Test + public void whenStyleMappingIsDefinedForCommentReferencesThenCommentsAreIncluded() throws IOException { + assertThat( + convertToHtml("comments.docx", mammoth -> mammoth.idPrefix("doc-42-").addStyleMap("comment-reference => sup")), + isSuccess( + "<p>Ouch" + + "<sup><a href=\"#doc-42-comment-0\" id=\"doc-42-comment-ref-0\">[MW1]</a></sup>." + + "<sup><a href=\"#doc-42-comment-2\" id=\"doc-42-comment-ref-2\">[MW2]</a></sup></p>" + + "<dl><dt id=\"doc-42-comment-0\">Comment [MW1]</dt><dd><p>A tachyon walks into a bar. <a href=\"#doc-42-comment-ref-0\">↑</a></p></dd>" + + "<dt id=\"doc-42-comment-2\">Comment [MW2]</dt><dd><p>Fin. <a href=\"#doc-42-comment-ref-2\">↑</a></p></dd></dl>" + )); + } + + @Test public void relationshipsAreReadForEachFileContainingBodyXml() throws IOException { assertThat( convertToHtml("footnote-hyperlink.docx", mammoth -> mammoth.idPrefix("doc-42-")), |
