easy-template-x
Advanced tools
Comparing version 0.11.0 to 0.11.1
# Change Log | ||
## [0.11.1 - 2020-03-29](https://github.com/alonrbar/easy-template-x/tree/v0.11.1) | ||
### Fixed | ||
- Consistent handling of `RawXmlContent` when the `xml` prop is null. | ||
## [0.11.0 - 2020-03-29](https://github.com/alonrbar/easy-template-x/tree/v0.11.0) | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "easy-template-x", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Generate docx documents from templates, in Node or in the browser.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,10 +12,9 @@ import { ScopeData, Tag } from '../../compilation'; | ||
let replaceNode: XmlNode = this.utilities.docxParser.containingTextNode(tag.xmlTextNode); | ||
const value = data.getScopeData<RawXmlContent>(); | ||
if (value && typeof value.xml === 'string') { | ||
if (value.replaceParagraph === true) { | ||
replaceNode = this.utilities.docxParser.containingParagraphNode(tag.xmlTextNode); | ||
} | ||
const replaceNode = value?.replaceParagraph ? | ||
this.utilities.docxParser.containingParagraphNode(tag.xmlTextNode) : | ||
this.utilities.docxParser.containingTextNode(tag.xmlTextNode); | ||
if (typeof value?.xml === 'string') { | ||
const newNode = this.utilities.xmlParser.parse(value.xml); | ||
@@ -22,0 +21,0 @@ XmlNode.insertBefore(newNode, replaceNode); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
346384
8136