aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-05-12 21:43:09 +0100
committerMichael Williamson <mike@zwobble.org>2016-05-12 21:43:09 +0100
commit9ecffea916f3117ad4d2484c1674d81862ef726f (patch)
tree2cc8dcbf508364ddd1d0c0b628a7a95757ac9727 /lib
parent95fbf5b6967671758abe87bdf1559f22474786bf (diff)
Actually add support for table cells spanning multiple rows
Diffstat (limited to 'lib')
-rw-r--r--lib/document-to-html.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index 81a887e..e3cb169 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -202,7 +202,13 @@ function DocumentConversion(options) {
function convertTableCell(element, messages, callback) {
convertElements(element.children, messages, function(error, children) {
- var attributes = element.colSpan === 1 ? {} : {colspan: element.colSpan.toString()};
+ var attributes = {};
+ if (element.colSpan !== 1) {
+ attributes.colspan = element.colSpan.toString();
+ }
+ if (element.rowSpan !== 1) {
+ attributes.rowspan = element.rowSpan.toString();
+ }
callback(null, Html.freshElement("td", attributes, [
Html.forceWrite,