@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.js CHANGED
@@ -3005,7 +3005,7 @@ function isTitleContentNode(node) {
3005
3005
  if (!text || text.length > 140) return false;
3006
3006
  const words = text.split(/\s+/);
3007
3007
  if (words.length > 14) return false;
3008
- const startsWithStructuredHeading = /^(section|item|part|endorsement|schedule|article)\b|^[A-Z]\.\s|\b[IVX]+\.\s/i.test(text);
3008
+ 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);
3009
3009
  const uppercaseLetters = [...text].filter((char) => /[A-Z]/.test(char)).length;
3010
3010
  const lowercaseLetters = [...text].filter((char) => /[a-z]/.test(char)).length;
3011
3011
  const mostlyUppercase = uppercaseLetters > 0 && uppercaseLetters >= lowercaseLetters * 1.6;