@veryfront/ext-document-kreuzberg 0.1.1277 → 0.1.1279-rc.24496

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.
@@ -24,7 +24,7 @@ function normalizePptxText(value) {
24
24
  return value.replace(/\s+/g, " ").trim();
25
25
  }
26
26
  function cleanExtractedMarkdown(value) {
27
- return value.replace(/!\[[^\]\n]*\]\(\s*\)/g, "").replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
27
+ return value.replace(/!\[[^\]\n]*\]\(\s*\)/g, "").replace(/(?<![ \t])[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
28
28
  }
29
29
  function slideNumber(path) {
30
30
  return Number(path.match(/\/slide(\d+)\.xml$/)?.[1] ?? 0);
@@ -76,7 +76,7 @@ function normalizePptxMarkdownHeadings(markdown, xml) {
76
76
  if (roles.size === 0) return markdown;
77
77
  return cleanExtractedMarkdown(
78
78
  markdown.split("\n").map((line) => {
79
- const heading = line.match(/^#{1,6}\s+(.+?)\s*$/);
79
+ const heading = line.trimEnd().match(/^#{1,6}\s+(\S.*)$/);
80
80
  if (!heading) return line;
81
81
  const text = heading[1] ?? "";
82
82
  const queue = roles.get(normalizePptxText(text));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-document-kreuzberg",
3
- "version": "0.1.1277",
3
+ "version": "0.1.1279-rc.24496",
4
4
  "description": "Veryfront first-party extension package for ext-document-kreuzberg",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -69,7 +69,7 @@
69
69
  "pdf-lib": "1.17.1"
70
70
  },
71
71
  "peerDependencies": {
72
- "veryfront": "^0.1.1277"
72
+ "veryfront": "^0.1.1279-rc.24496"
73
73
  },
74
74
  "type": "module",
75
75
  "types": "./esm/extensions/ext-document-kreuzberg/src/index.d.ts",
@@ -79,5 +79,5 @@
79
79
  "NOTICE",
80
80
  "README.md"
81
81
  ],
82
- "gitHead": "476dab4c6f1ebde6478ff0e762298aa333abf1ac"
82
+ "gitHead": "909763a7416d97141b8531fe2459255918d77179"
83
83
  }