@nuasite/cms 0.7.2 → 0.7.3

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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "directory": "packages/astro-cms"
15
15
  },
16
16
  "license": "Apache-2.0",
17
- "version": "0.7.2",
17
+ "version": "0.7.3",
18
18
  "module": "src/index.ts",
19
19
  "types": "src/index.ts",
20
20
  "type": "module",
@@ -645,7 +645,12 @@ export async function processHtml(
645
645
  // Only apply when includeTags is null or doesn't include 'span'
646
646
  if (skipInlineStyleTags && (includeTags === null || !includeTags.includes('span')) && tag === 'span') {
647
647
  const classAttr = node.getAttribute('class')
648
- if (classAttr && hasOnlyTextStyleClasses(classAttr)) {
648
+ // Skip bare spans (no classes) - they're just text wrappers
649
+ if (!classAttr || !classAttr.trim()) {
650
+ return
651
+ }
652
+ // Skip styled spans (only text styling classes)
653
+ if (hasOnlyTextStyleClasses(classAttr)) {
649
654
  return
650
655
  }
651
656
  }
@@ -711,7 +716,8 @@ export async function processHtml(
711
716
  const hasDescendants = hasCandidateDescendants(node)
712
717
 
713
718
  // Skip pure containers - they have no direct text and all content comes from children
714
- if (!directText && hasDescendants) {
719
+ // Exempt <a> elements - they have editable attributes (href)
720
+ if (!directText && hasDescendants && candidate.tag !== 'a') {
715
721
  candidateNodes.delete(node) // Remove from candidates so nested checks stay accurate
716
722
  continue
717
723
  }