formatferry 1.0.15 → 1.0.16
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 +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23058,7 +23058,10 @@ var PdfAdapter = class {
|
|
|
23058
23058
|
}
|
|
23059
23059
|
const paragraphs = page.textContent.split("\n\n").filter((p) => p.trim()).map((p) => {
|
|
23060
23060
|
const trimmed = p.trim();
|
|
23061
|
-
|
|
23061
|
+
const hasWideGap = /( {3,}|\u00A0\u00A0|\t)/.test(trimmed);
|
|
23062
|
+
const looksLikeSentence = trimmed.length > 40 && /^[A-Z]/.test(trimmed);
|
|
23063
|
+
const isShort = trimmed.length < 80 && !/[.,:;!?]$/.test(trimmed) && !/\n/.test(trimmed) && !hasWideGap && !looksLikeSentence;
|
|
23064
|
+
if (isShort) {
|
|
23062
23065
|
return `<p><strong>${escapeHtml(trimmed)}</strong></p>`;
|
|
23063
23066
|
}
|
|
23064
23067
|
return `<p>${escapeHtml(trimmed)}</p>`;
|
|
@@ -25314,8 +25317,8 @@ import { readFileSync as readFileSync4 } from "fs";
|
|
|
25314
25317
|
import { resolve, dirname as dirname3 } from "path";
|
|
25315
25318
|
import { fileURLToPath } from "url";
|
|
25316
25319
|
var getVersion = () => {
|
|
25317
|
-
if ("1.0.
|
|
25318
|
-
return "1.0.
|
|
25320
|
+
if ("1.0.16") {
|
|
25321
|
+
return "1.0.16";
|
|
25319
25322
|
}
|
|
25320
25323
|
try {
|
|
25321
25324
|
const __dirname = dirname3(fileURLToPath(import.meta.url));
|