aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-06-17 15:43:02 +0100
committerMichael Williamson <mike@zwobble.org>2015-06-17 15:43:02 +0100
commit62e6d800f0dd5b649ed094c3879e57a9c50dab8a (patch)
treec36176d5e77b868e44091de23b779123ea5b9c9e /README.md
parenta52d99fd85061a9f20b481535407a225d5927434 (diff)
Document strikethrough support
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index 76dc8c6..1f95160 100644
--- a/README.md
+++ b/README.md
@@ -233,6 +233,23 @@ var options = {
};
```
+### Strikethrough
+
+By default, strikethrough text is wrapped in `<s>` tags.
+This behaviour can be changed by adding a style mapping for `strike`.
+For instance, to wrap strikethrough text in `<del>` tags:
+
+```javascript
+var mammoth = require("mammoth");
+
+var options = {
+ styleMap: [
+ "strike => del"
+ ]
+};
+mammoth.convertToHtml({path: "path/to/document.docx"}, options);
+```
+
#### Document transforms
Mammoth allows a document to be transformed before it is converted.
@@ -486,6 +503,17 @@ u
Note that this matches text that has had underline explicitly applied to it.
It will not match any text that is underlined because of its paragraph or run style.
+#### Strikethough
+
+Match explicitly struckthrough text:
+
+```
+strike
+```
+
+Note that this matches text that has had strikethrough explicitly applied to it.
+It will not match any text that is struckthrough because of its paragraph or run style.
+
### HTML paths
#### Single elements