@lofcz/pptxtojson 2.2.7 → 2.2.9

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 CHANGED
@@ -81,7 +81,8 @@ async function readXmlFile(zip, filename) {
81
81
  if (!file) return null;
82
82
  const data = await file.async('string');
83
83
  return simplifyLostLess(txml_namespaceObject.parse(data, {
84
- keepWhitespace: true
84
+ keepWhitespace: true,
85
+ decodeEntities: true
85
86
  }));
86
87
  } catch {
87
88
  return null;
@@ -2722,6 +2723,7 @@ function getSize(slideSpNode, slideLayoutSpNode, slideMasterSpNode) {
2722
2723
  height: numberToFixed(parseInt(ext['cy']) * RATIO_EMUs_Points)
2723
2724
  };
2724
2725
  }
2726
+ const external_entities_namespaceObject = require("entities");
2725
2727
  const external_dwml_ts_namespaceObject = require("dwml-ts");
2726
2728
  function findOMath(obj) {
2727
2729
  let results = [];
@@ -2817,7 +2819,7 @@ function mathRunHasOwnColor(styleNode) {
2817
2819
  return !!(rPr && (rPr['a:solidFill'] || rPr['a:gradFill'] || rPr['a:pattFill']));
2818
2820
  }
2819
2821
  function latexFormart(latex) {
2820
- return latex.replaceAll(/&lt;/g, '<').replaceAll(/&gt;/g, '>').replaceAll(/&amp;/g, '&').replaceAll(/&apos;/g, "'").replaceAll(/&quot;/g, '"');
2822
+ return (0, external_entities_namespaceObject.decodeXML)(latex);
2821
2823
  }
2822
2824
  function getShadow(node, warpObj) {
2823
2825
  const chdwClrNode = getSolidFill(node, void 0, void 0, warpObj);