@adobe/helix-html-pipeline 6.28.2 → 6.28.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [6.28.3](https://github.com/adobe/helix-html-pipeline/compare/v6.28.2...v6.28.3) (2026-04-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * support mixed and comma-separated section metadata values ([#1068](https://github.com/adobe/helix-html-pipeline/issues/1068)) ([f18796b](https://github.com/adobe/helix-html-pipeline/commit/f18796b6a6fc03eda3ac9b0a9df86c0b8e590ea1))
7
+
1
8
  ## [6.28.2](https://github.com/adobe/helix-html-pipeline/compare/v6.28.1...v6.28.2) (2026-04-09)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.28.2",
3
+ "version": "6.28.3",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -84,7 +84,7 @@
84
84
  "esmock": "2.7.3",
85
85
  "husky": "9.1.7",
86
86
  "js-yaml": "4.1.1",
87
- "jsdom": "28.1.0",
87
+ "jsdom": "29.0.1",
88
88
  "junit-report-builder": "5.1.1",
89
89
  "lint-staged": "16.4.0",
90
90
  "mocha": "11.7.5",
package/src/html-pipe.js CHANGED
@@ -168,8 +168,8 @@ export async function htmlPipe(state, req) {
168
168
  await rewriteUrls(state);
169
169
  await fixSections(state);
170
170
  await createPageBlocks(state);
171
- await extractSectionMetadata(state);
172
171
  await createPictures(state);
172
+ await extractSectionMetadata(state);
173
173
  await extractMetaData(state, req);
174
174
  await rewriteIcons(state);
175
175
  await addHeadingIds(state);
@@ -30,28 +30,28 @@ function isSectionMetadataEnabled(config) {
30
30
  }
31
31
 
32
32
  /**
33
- * Extracts a value from a HAST node by looking for image src or link href attributes.
34
- * Falls back to text content if no images or links are found.
33
+ * Extracts a value from a HAST node by collecting image srcs, link hrefs,
34
+ * and text tokens (split by comma/whitespace).
35
35
  * @param {object} $value the HAST value node
36
36
  * @returns {string} the extracted value
37
37
  */
38
38
  function getValueFromNode($value) {
39
- const urls = [];
39
+ const items = [];
40
40
  visit($value, (node) => {
41
41
  if (node.tagName === 'img' && node.properties?.src) {
42
- urls.push(node.properties.src);
42
+ items.push(node.properties.src);
43
43
  return SKIP;
44
44
  }
45
45
  if (node.tagName === 'a' && node.properties?.href) {
46
- urls.push(node.properties.href);
46
+ items.push(node.properties.href);
47
47
  return SKIP;
48
48
  }
49
+ if (node.type === 'text') {
50
+ items.push(...node.value.trim().split(/[,\s]+/).filter(Boolean));
51
+ }
49
52
  return CONTINUE;
50
53
  });
51
- if (urls.length) {
52
- return urls.join(',');
53
- }
54
- return toString($value).trim();
54
+ return items.join(',');
55
55
  }
56
56
 
57
57
  /**