@lofcz/pptxtojson 2.2.7 → 2.2.8

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.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import jszip from "jszip";
2
2
  import tinycolor2 from "tinycolor2";
3
+ import { decodeXML } from "entities";
3
4
  import { ommlNodeToLatex } from "dwml-ts";
4
5
  import * as __rspack_external_txml_txml_8f745c7f from "txml/txml";
5
6
  let cust_attr_order = 0;
@@ -51,7 +52,8 @@ async function readXmlFile(zip, filename) {
51
52
  if (!file) return null;
52
53
  const data = await file.async('string');
53
54
  return simplifyLostLess(__rspack_external_txml_txml_8f745c7f.parse(data, {
54
- keepWhitespace: true
55
+ keepWhitespace: true,
56
+ decodeEntities: true
55
57
  }));
56
58
  } catch {
57
59
  return null;
@@ -2785,7 +2787,7 @@ function mathRunHasOwnColor(styleNode) {
2785
2787
  return !!(rPr && (rPr['a:solidFill'] || rPr['a:gradFill'] || rPr['a:pattFill']));
2786
2788
  }
2787
2789
  function latexFormart(latex) {
2788
- return latex.replaceAll(/&lt;/g, '<').replaceAll(/&gt;/g, '>').replaceAll(/&amp;/g, '&').replaceAll(/&apos;/g, "'").replaceAll(/&quot;/g, '"');
2790
+ return decodeXML(latex);
2789
2791
  }
2790
2792
  function getShadow(node, warpObj) {
2791
2793
  const chdwClrNode = getSolidFill(node, void 0, void 0, warpObj);