diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-08-14 22:20:14 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-08-14 22:20:14 +0100 |
| commit | bdd02cadee90c36a94224ca1bb6939afde50ac84 (patch) | |
| tree | a8b6c72d06c3f786f4d87388ccdf35d461d83b87 /README.md | |
| parent | da7ca2ccd9542f6a280bf5b676ea111a8e102729 (diff) | |
Document comment syntax in style maps
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -85,6 +85,8 @@ Where `custom-style-map` looks something like: p[style-name='Aside Heading'] => div.aside > h2:fresh p[style-name='Aside Text'] => div.aside > p:fresh +Lines beginning with `#` will be ignored. + #### Markdown Using `--output-format=markdown` will cause Markdown to be generated. @@ -164,7 +166,8 @@ mammoth.convertToHtml({path: "path/to/document.docx"}, options); To more easily support style maps stored in text files, `styleMap` can also be a string. -Each non-blank line is treated as a separate style mapping: +Each line is treated as a separate style mapping, +ignoring blank lines and lines starting with `#`: ```javascript var options = { @@ -316,7 +319,8 @@ Converts the source document to HTML. * `styleMap`: controls the mapping of Word styles to HTML. If `options.styleMap` is a string, - each non-blank line is treated as a separate style mapping. + each line is treated as a separate style mapping, + ignoring blank lines and lines starting with `#`: If `options.styleMap` is an array, 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. |
