aboutsummaryrefslogtreecommitdiff
path: root/test/document-to-html.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-28 21:08:40 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-28 21:08:40 +0000
commita12b966752ba7ae880f7d6348a42cc986e891a82 (patch)
treeab244d36ea978f5b75021c9c6b49b53376f33aef /test/document-to-html.tests.js
parent481d5860686b6b02b5536d7455b88baf7325ecfd (diff)
Map breaks with style maps
Diffstat (limited to 'test/document-to-html.tests.js')
-rw-r--r--test/document-to-html.tests.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js
index d21badb..8124ad1 100644
--- a/test/document-to-html.tests.js
+++ b/test/document-to-html.tests.js
@@ -450,6 +450,21 @@ test('breaks that are not line breaks are ignored', function() {
});
});
+test('breaks can be mapped using style mappings', function() {
+ var converter = new DocumentConverter({
+ styleMap: [
+ {
+ from: documentMatchers.pageBreak,
+ to: htmlPaths.topLevelElement("hr")
+ }
+ ]
+ });
+
+ return converter.convertToHtml(documents.pageBreak).then(function(result) {
+ assert.equal(result.value, "<hr />");
+ });
+});
+
test('footnote reference is converted to superscript intra-page link', function() {
var footnoteReference = new documents.NoteReference({
noteType: "footnote",