diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-03-31 18:59:58 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-03-31 18:59:58 +0100 |
| commit | 7f415770a2039f9072356e6b17349004c1ff35c0 (patch) | |
| tree | 6e53679ed0071a50629628b5f0f524545741891a /lib | |
| parent | 8b494256243da202598bc573af03bf8001f0502d (diff) | |
Rename paragraphStyleMap to just styleMap
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/documents.js | 5 | ||||
| -rw-r--r-- | lib/index.js | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/documents.js b/lib/documents.js index 83a8106..0a6ddff 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -11,10 +11,9 @@ exports.Text = Text; function DocumentConverter(options) { options = options || {}; - options.paragraphStyleMap = options.paragraphStyleMap || {}; var defaultParagraphStyle = options.defaultParagraphStyle || styles.topLevelElement("p"); - var paragraphStyleMap = options.paragraphStyleMap; + var styleMap = options.styleMap || {}; function convertToHtml(document) { var html = new HtmlGenerator(); @@ -44,7 +43,7 @@ function DocumentConverter(options) { } function styleForParagraph(element) { - return paragraphStyleMap[element.properties.styleName] || defaultParagraphStyle; + return styleMap[element.properties.styleName] || defaultParagraphStyle; } var elementConverters = { diff --git a/lib/index.js b/lib/index.js index b124b81..b1e2da0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,7 +8,7 @@ var styles = require("./styles"); exports.Converter = Converter; exports.standardOptions = { - paragraphStyleMap: { + styleMap: { "Heading1": styles.topLevelElement("h1"), "Heading2": styles.topLevelElement("h2"), "Heading3": styles.topLevelElement("h3"), |
