From a12b966752ba7ae880f7d6348a42cc986e891a82 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 28 Nov 2016 21:08:40 +0000 Subject: Map breaks with style maps --- test/document-to-html.tests.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/document-to-html.tests.js') 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, "
"); + }); +}); + test('footnote reference is converted to superscript intra-page link', function() { var footnoteReference = new documents.NoteReference({ noteType: "footnote", -- cgit v1.2.3