docx-templates
Advanced tools
Comparing version 4.8.1 to 4.8.2
@@ -0,1 +1,4 @@ | ||
## 4.8.2 (2021-09-28) | ||
- [PR 233](https://github.com/guigrpa/docx-templates/pull/233) Prevent adding empty paragraph if cell contains altChunk. Thanks @pkozul! | ||
## 4.8.1 (2021-09-28) | ||
@@ -2,0 +5,0 @@ - [#239](https://github.com/guigrpa/docx-templates/issues/239) Fixed issue that prevented the `listCommands` function from detecting commands in the template's header and footer. |
@@ -314,7 +314,7 @@ "use strict"; | ||
} | ||
// `w:tc` nodes shouldn't be left with no `w:p` children; if that's the | ||
// `w:tc` nodes shouldn't be left with no `w:p` or 'w:altChunk' children; if that's the | ||
// case, add an empty `w:p` inside | ||
if (!nodeOut._fTextNode && // Flow-prevention | ||
nodeOut._tag === 'w:tc' && | ||
!nodeOut._children.filter(function (o) { return !o._fTextNode && o._tag === 'w:p'; }).length) { | ||
!nodeOut._children.filter(function (o) { return !o._fTextNode && (o._tag === 'w:p' || o._tag === 'w:altChunk'); }).length) { | ||
nodeOut._children.push({ | ||
@@ -321,0 +321,0 @@ _parent: nodeOut, |
{ | ||
"name": "docx-templates", | ||
"version": "4.8.1", | ||
"version": "4.8.2", | ||
"description": "Template-based docx report creation", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1616370