aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-27 15:58:59 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-27 15:58:59 +0100
commit869d5b2a725db8e41dc447227468c173d5292c18 (patch)
tree176267563f49df0d6804437c19dbbf62134569d2 /README.md
parente9d9ab3c03b6018ba8b63335e6aa2b1809a188a5 (diff)
Remove mammoth.styleMapping
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 5 insertions, 10 deletions
diff --git a/README.md b/README.md
index 0e2c047..dbebe56 100644
--- a/README.md
+++ b/README.md
@@ -103,12 +103,11 @@ and paragraphs with the style name `Subsection Title` should be converted to `h2
```javascript
var mammoth = require("mammoth");
-var styleMapping = mammoth.styleMapping;
var options = {
styleMap: [
- styleMapping("p[style-name='Section Title'] => h1:fresh"),
- styleMapping("p[style-name='Subsection Title'] => h2:fresh")
+ "p[style-name='Section Title'] => h1:fresh",
+ "p[style-name='Subsection Title'] => h2:fresh"
]
};
mammoth.convertToHtml({path: "path/to/document.docx"}, options);
@@ -132,8 +131,8 @@ set `options.includeDefaultStyleMap` to `false`:
```javascript
var options = {
styleMap: [
- styleMapping("p[style-name='Section Title'] => h1:fresh"),
- styleMapping("p[style-name='Subsection Title'] => h2:fresh")
+ "p[style-name='Section Title'] => h1:fresh",
+ "p[style-name='Subsection Title'] => h2:fresh"
],
includeDefaultStyleMap: false
};
@@ -187,7 +186,7 @@ Converts the source document to HTML.
If `options.styleMap` is a string,
each non-blank line is treated as a separate style mapping.
If `options.styleMap` is an array,
- each element is expected to be the result of a call to `mammoth.styleMapping`.
+ each element is expected to be a string representing a single style mapping.
See "Writing style maps" for a reference to the syntax for style maps.
* `includeDefaultStyleMap`: by default,
@@ -205,10 +204,6 @@ Converts the source document to HTML.
* `messages`: any messages, such as errors and warnings, generated during the conversion
-#### `mammoth.styleMapping(string)`
-
-Creates a style mapping using the passed string.
-
#### Messages
Each message has the following properties: