diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-28 18:01:35 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-28 18:01:35 +0000 |
| commit | cdfeaf4b15e7161a0eae4bcb3df868d709db10ad (patch) | |
| tree | 66786031e5c5e357cd2436610046b4470cc79b03 /lib | |
| parent | bb3d113828218fa29dae16cae6f2ff5e05e48564 (diff) | |
Only convert line breaks to br elements
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-to-html.js | 6 | ||||
| -rw-r--r-- | lib/documents.js | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 2591e4f..a51afd0 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -350,7 +350,11 @@ function DocumentConversion(options, comments) { "tableRow": convertTableRow, "tableCell": convertTableCell, "break": function(element, messages) { - return [Html.freshElement("br")]; + if (element.breakType === "line") { + return [Html.freshElement("br")]; + } else { + return []; + } } }; return { diff --git a/lib/documents.js b/lib/documents.js index cb62939..cf56174 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -200,6 +200,8 @@ exports.Table = Table; exports.TableRow = TableRow; exports.TableCell = TableCell; exports.lineBreak = Break("line"); +exports.pageBreak = Break("page"); +exports.columnBreak = Break("column"); exports.BookmarkStart = BookmarkStart; exports.verticalAlignment = verticalAlignment; |
