aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-01-07 23:04:12 +0000
committerMichael Williamson <mike@zwobble.org>2014-01-07 23:04:12 +0000
commit743ca7a9b10aca9c9ce4e20cc3246558f1eb706e (patch)
treed72297928b7650d310293146707a7defec682f8a /README.md
parent542016383adcf720da27a52e711ec349e4406ecd (diff)
Rename mammoth.style to mammoth.styleMapping
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index d9805d7..5cd34bc 100644
--- a/README.md
+++ b/README.md
@@ -56,12 +56,12 @@ and paragraphs with the style `SubSectionTitle` should be converted to `h2` elem
```javascript
var mammoth = require("mammoth");
-var style = mammoth.style;
+var styleMapping = mammoth.styleMapping;
var options = {
styleMap: [
- style("p.SectionTitle => h1:fresh"),
- style("p.SubSectionTitle => h2:fresh")
+ styleMapping("p.SectionTitle => h1:fresh"),
+ styleMapping("p.SubSectionTitle => h2:fresh")
]
};
mammoth.convertToHtml({path: "path/to/document.docx"}, options);
@@ -74,8 +74,8 @@ set `options.includeDefaultStyleMap` to `false`:
```javascript
var options = {
styleMap: [
- style("p.SectionTitle => h1:fresh"),
- style("p.SubSectionTitle => h2:fresh")
+ styleMapping("p.SectionTitle => h1:fresh"),
+ styleMapping("p.SubSectionTitle => h2:fresh")
],
includeDefaultStyleMap: false
};
@@ -97,7 +97,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.style`.
+ each element is expected to be the result of a call to `mammoth.styleMapping`.
See "Writing style maps" for a reference to the syntax for style maps.
** `includeDefaultStyleMap`: by default,
@@ -112,9 +112,9 @@ Converts the source document to HTML.
** `messages`: any messages, such as errors and warnings, generated during the conversion
-#### `mammoth.style(string)`
+#### `mammoth.styleMapping(string)`
-Creates a style using the passed string.
+Creates a style mapping using the passed string.
#### Messages