diff options
| -rw-r--r-- | lib/styles.js | 5 | ||||
| -rw-r--r-- | tests/documents.tests.js | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/styles.js b/lib/styles.js new file mode 100644 index 0000000..3c5a3ff --- /dev/null +++ b/lib/styles.js @@ -0,0 +1,5 @@ +exports.topLevelElement = topLevelElement; + +function topLevelElement(tagName) { + return tagName; +} diff --git a/tests/documents.tests.js b/tests/documents.tests.js index 7161377..b9fe15a 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -3,6 +3,7 @@ var assert = require("assert"); var documents = require("../lib/documents"); var DocumentConverter = documents.DocumentConverter; var test = require("./testing").test; +var styles = require("../lib/styles"); describe('DocumentConverter', function() { @@ -43,7 +44,7 @@ describe('DocumentConverter', function() { ]); var converter = new DocumentConverter({ paragraphStyleMap: { - "Heading1": "h1" + "Heading1": styles.topLevelElement("h1") } }); return converter.convertToHtml(document).then(function(result) { |
