pptx-glimpse 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1692,6 +1692,7 @@ var standardParser = new import_fast_xml_parser.XMLParser({
|
|
|
1692
1692
|
attributeNamePrefix: "@_",
|
|
1693
1693
|
removeNSPrefix: true,
|
|
1694
1694
|
htmlEntities: true,
|
|
1695
|
+
trimValues: false,
|
|
1695
1696
|
isArray: (_name, jpath, _isLeafNode, _isAttribute) => {
|
|
1696
1697
|
const tag = String(jpath).split(".").pop() ?? "";
|
|
1697
1698
|
return ARRAY_TAGS.has(tag);
|
|
@@ -8060,7 +8061,7 @@ function renderTextBody(textBody, transform) {
|
|
|
8060
8061
|
const firstParaFontSizePt = getParagraphFontSize(paragraphs[0], defaultFontSize) * fontScale;
|
|
8061
8062
|
const firstLineBaselineOffsetPt = firstParaFontSizePt * defaultAscenderRatio;
|
|
8062
8063
|
yStart += firstLineBaselineOffsetPt * PX_PER_PT3;
|
|
8063
|
-
const textElement = `<text x="0" y="${yStart}">${tspans.join("")}</text>`;
|
|
8064
|
+
const textElement = `<text x="0" y="${yStart}" xml:space="preserve">${tspans.join("")}</text>`;
|
|
8064
8065
|
if (isVerticalText(bodyProperties.vert)) {
|
|
8065
8066
|
return `<g transform="translate(${originalWidth}, 0) rotate(90)">${textElement}</g>`;
|
|
8066
8067
|
}
|
package/dist/index.js
CHANGED
|
@@ -1655,6 +1655,7 @@ var standardParser = new XMLParser({
|
|
|
1655
1655
|
attributeNamePrefix: "@_",
|
|
1656
1656
|
removeNSPrefix: true,
|
|
1657
1657
|
htmlEntities: true,
|
|
1658
|
+
trimValues: false,
|
|
1658
1659
|
isArray: (_name, jpath, _isLeafNode, _isAttribute) => {
|
|
1659
1660
|
const tag = String(jpath).split(".").pop() ?? "";
|
|
1660
1661
|
return ARRAY_TAGS.has(tag);
|
|
@@ -8022,7 +8023,7 @@ function renderTextBody(textBody, transform) {
|
|
|
8022
8023
|
const firstParaFontSizePt = getParagraphFontSize(paragraphs[0], defaultFontSize) * fontScale;
|
|
8023
8024
|
const firstLineBaselineOffsetPt = firstParaFontSizePt * defaultAscenderRatio;
|
|
8024
8025
|
yStart += firstLineBaselineOffsetPt * PX_PER_PT3;
|
|
8025
|
-
const textElement = `<text x="0" y="${yStart}">${tspans.join("")}</text>`;
|
|
8026
|
+
const textElement = `<text x="0" y="${yStart}" xml:space="preserve">${tspans.join("")}</text>`;
|
|
8026
8027
|
if (isVerticalText(bodyProperties.vert)) {
|
|
8027
8028
|
return `<g transform="translate(${originalWidth}, 0) rotate(90)">${textElement}</g>`;
|
|
8028
8029
|
}
|
package/package.json
CHANGED