aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-06-17 15:32:53 +0100
committerMichael Williamson <mike@zwobble.org>2015-06-17 15:35:22 +0100
commitdc53892204989de1788081624c65062dc283480a (patch)
tree5efcf80db1a80eb06f29d5c03cdeb97823f1085b /lib
parent511f6787dd943fc8a9321bd0e3464eb1e0eef11b (diff)
Add support for strikethrough
Diffstat (limited to 'lib')
-rw-r--r--lib/document-to-html.js3
-rw-r--r--lib/documents.js1
-rw-r--r--lib/docx/document-xml-reader.js1
3 files changed, 5 insertions, 0 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index 264f7c9..f424acf 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -125,6 +125,9 @@ function DocumentConversion(options) {
if (run.isUnderline) {
convertUnderline(runHtml);
}
+ if (run.isStrikethrough) {
+ runHtml.open(htmlPaths.element("s"));
+ }
convertElements(run.children, runHtml, messages, function(err) {
if (err) {
callback(err);
diff --git a/lib/documents.js b/lib/documents.js
index 10d8646..4e4211b 100644
--- a/lib/documents.js
+++ b/lib/documents.js
@@ -48,6 +48,7 @@ function Run(children, properties) {
isBold: properties.isBold,
isUnderline: properties.isUnderline,
isItalic: properties.isItalic,
+ isStrikethrough: properties.isStrikethrough,
verticalAlignment: properties.verticalAlignment || verticalAlignment.baseline
};
}
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js
index 8bdb8cc..1d36d91 100644
--- a/lib/docx/document-xml-reader.js
+++ b/lib/docx/document-xml-reader.js
@@ -75,6 +75,7 @@ function DocumentXmlReader(options) {
properties.isBold = !!element.first("w:b");
properties.isUnderline = !!element.first("w:u");
properties.isItalic = !!element.first("w:i");
+ properties.isStrikethrough = !!element.first("w:strike");
return elementResult(properties);
}