Comparing version 5.7.1 to 5.7.2
@@ -76,3 +76,4 @@ "use strict"; | ||
var segment = (0, _objectToXml.makeElement)('segment', null, true); | ||
segment.elements.push((0, _objectToXml.makeElement)('source', null, (0, _objectToXml.makeValue)(unit.source, _ElementTypes.default))); | ||
if (!unit.source && unit.target) unit.source = ''; | ||
if (unit.source) segment.elements.push((0, _objectToXml.makeElement)('source', null, (0, _objectToXml.makeValue)(unit.source, _ElementTypes.default))); | ||
if (unit.target !== undefined) segment.elements.push((0, _objectToXml.makeElement)('target', null, (0, _objectToXml.makeValue)(unit.target, _ElementTypes.default))); | ||
@@ -79,0 +80,0 @@ var subEle = [segment]; |
@@ -97,3 +97,4 @@ "use strict"; | ||
u.elements.push((0, _objectToXml.makeElement)('source', sourceAttributes, (0, _objectToXml.makeValue)(resource.source, _ElementTypes.default))); | ||
if (!resource.source && resource.target) resource.source = ''; | ||
if (resource.source) u.elements.push((0, _objectToXml.makeElement)('source', sourceAttributes, (0, _objectToXml.makeValue)(resource.source, _ElementTypes.default))); | ||
@@ -100,0 +101,0 @@ if (resource.target != null) { |
@@ -62,3 +62,4 @@ import convert from 'xml-js'; | ||
var segment = makeElement('segment', null, true); | ||
segment.elements.push(makeElement('source', null, makeValue(unit.source, ElementTypes2))); | ||
if (!unit.source && unit.target) unit.source = ''; | ||
if (unit.source) segment.elements.push(makeElement('source', null, makeValue(unit.source, ElementTypes2))); | ||
if (unit.target !== undefined) segment.elements.push(makeElement('target', null, makeValue(unit.target, ElementTypes2))); | ||
@@ -65,0 +66,0 @@ var subEle = [segment]; |
@@ -83,3 +83,4 @@ import convert from 'xml-js'; | ||
u.elements.push(makeElement('source', sourceAttributes, makeValue(resource.source, ElementTypes12))); | ||
if (!resource.source && resource.target) resource.source = ''; | ||
if (resource.source) u.elements.push(makeElement('source', sourceAttributes, makeValue(resource.source, ElementTypes12))); | ||
@@ -86,0 +87,0 @@ if (resource.target != null) { |
@@ -59,3 +59,4 @@ import convert from 'xml-js' | ||
const segment = makeElement('segment', null, true) | ||
segment.elements.push(makeElement('source', null, makeValue(unit.source, ElementTypes2))) | ||
if (!unit.source && unit.target) unit.source = '' | ||
if (unit.source) segment.elements.push(makeElement('source', null, makeValue(unit.source, ElementTypes2))) | ||
if (unit.target !== undefined) segment.elements.push(makeElement('target', null, makeValue(unit.target, ElementTypes2))) | ||
@@ -62,0 +63,0 @@ const subEle = [segment] |
@@ -77,3 +77,4 @@ import convert from 'xml-js' | ||
} | ||
u.elements.push(makeElement('source', sourceAttributes, makeValue(resource.source, ElementTypes12))) | ||
if (!resource.source && resource.target) resource.source = '' | ||
if (resource.source) u.elements.push(makeElement('source', sourceAttributes, makeValue(resource.source, ElementTypes12))) | ||
if (resource.target != null) { | ||
@@ -80,0 +81,0 @@ let targetAttributes = null |
{ | ||
"name": "xliff", | ||
"version": "5.7.1", | ||
"version": "5.7.2", | ||
"description": "xliff2js and js2xliff converter xliff utils", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10996
544817
66