@claritylabs/cl-sdk 3.0.16 → 3.0.17

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.mjs CHANGED
@@ -2650,7 +2650,7 @@ function isTitleContentNode(node) {
2650
2650
  if (!text || text.length > 140) return false;
2651
2651
  const words = text.split(/\s+/);
2652
2652
  if (words.length > 14) return false;
2653
- const startsWithStructuredHeading = /^(section|item|part|endorsement|schedule|article)\b|^[A-Z]\.\s|\b[IVX]+\.\s/i.test(text);
2653
+ const startsWithStructuredHeading = /^(SECTION|PART|SCHEDULE|ARTICLE)\b/.test(text) || /^Section\s+[IVX0-9]+(?:\.[A-Z])?\s*[—:-]/.test(text) || /^Item\s+\d+[\.:]/i.test(text) || /^Endorsement\s+(?:No\.?|Number|#)\s+/i.test(text) || /^[A-Z]\.\s/.test(text) || /\b[IVX]+\.\s/.test(text);
2654
2654
  const uppercaseLetters = [...text].filter((char) => /[A-Z]/.test(char)).length;
2655
2655
  const lowercaseLetters = [...text].filter((char) => /[a-z]/.test(char)).length;
2656
2656
  const mostlyUppercase = uppercaseLetters > 0 && uppercaseLetters >= lowercaseLetters * 1.6;