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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. 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
- if (trimmed.length < 100 && !trimmed.match(/[.,:;!?]$/)) {
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.15") {
25318
- return "1.0.15";
25320
+ if ("1.0.16") {
25321
+ return "1.0.16";
25319
25322
  }
25320
25323
  try {
25321
25324
  const __dirname = dirname3(fileURLToPath(import.meta.url));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formatferry",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "FormatFerry CLI — Convert HTML, DOCX, PDF, XLSX, CSV, JSON, XML, PPTX to Markdown",
5
5
  "keywords": [
6
6
  "markdown",