decant-core 1.2.5 → 1.2.6

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.
@@ -14,11 +14,12 @@ export function sanitizeResponseContainer(container) {
14
14
  : [];
15
15
  unwanted.forEach((el) => el.remove());
16
16
 
17
- // 2. Remove base64 inline images to prevent megabyte-scale text walls in markdown exports
17
+ // 2. Remove base64 inline images to prevent megabyte-scale text walls in markdown exports,
18
+ // while preserving math LaTeX equation images marked with data-xpm-latex
18
19
  const images = clone.querySelectorAll ? clone.querySelectorAll("img") : [];
19
20
  images.forEach((img) => {
20
21
  const src = img.getAttribute("src") || "";
21
- if (src.startsWith("data:image/")) {
22
+ if (src.startsWith("data:image/") && !img.hasAttribute("data-xpm-latex")) {
22
23
  img.remove();
23
24
  }
24
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decant-core",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Shared AI chat platform parsers and detection for Covai browser extensions.",
5
5
  "type": "module",
6
6
  "main": "ai/index.js",