@adobe/helix-html-pipeline 6.28.4 → 6.28.6
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,17 @@
|
|
|
1
|
+
## [6.28.6](https://github.com/adobe/helix-html-pipeline/compare/v6.28.5...v6.28.6) (2026-04-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* absolutify img and link URLs in section metadata ([#1069](https://github.com/adobe/helix-html-pipeline/issues/1069)) ([#1070](https://github.com/adobe/helix-html-pipeline/issues/1070)) ([20eed7e](https://github.com/adobe/helix-html-pipeline/commit/20eed7e2173869f6792ae131b98053e186b75d34))
|
|
7
|
+
|
|
8
|
+
## [6.28.5](https://github.com/adobe/helix-html-pipeline/compare/v6.28.4...v6.28.5) (2026-04-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/mdast-util-gridtables to v4.0.19 ([#1073](https://github.com/adobe/helix-html-pipeline/issues/1073)) ([ef1718f](https://github.com/adobe/helix-html-pipeline/commit/ef1718f5ec31794d6968f147a311f44ca8f18ce0))
|
|
14
|
+
|
|
1
15
|
## [6.28.4](https://github.com/adobe/helix-html-pipeline/compare/v6.28.3...v6.28.4) (2026-04-13)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "6.28.
|
|
3
|
+
"version": "6.28.6",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@adobe/helix-markdown-support": "7.1.18",
|
|
46
46
|
"@adobe/helix-shared-utils": "3.0.2",
|
|
47
|
-
"@adobe/mdast-util-gridtables": "4.0.
|
|
47
|
+
"@adobe/mdast-util-gridtables": "4.0.19",
|
|
48
48
|
"@adobe/remark-gridtables": "3.0.19",
|
|
49
49
|
"github-slugger": "2.0.0",
|
|
50
50
|
"hast-util-raw": "9.1.0",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { toString } from 'hast-util-to-string';
|
|
13
13
|
import { CONTINUE, SKIP, visit } from 'unist-util-visit';
|
|
14
14
|
import { toMetaName } from '../utils/modifiers.js';
|
|
15
|
-
import { toBlockCSSClassNames } from './utils.js';
|
|
15
|
+
import { getAbsoluteUrl, toBlockCSSClassNames } from './utils.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Checks whether section metadata processing is enabled for the current site.
|
|
@@ -32,18 +32,21 @@ function isSectionMetadataEnabled(config) {
|
|
|
32
32
|
/**
|
|
33
33
|
* Extracts a value from a HAST node by collecting image srcs, link hrefs,
|
|
34
34
|
* and text tokens (split by comma/whitespace).
|
|
35
|
+
* @param {PipelineState} state
|
|
35
36
|
* @param {object} $value the HAST value node
|
|
36
37
|
* @returns {string} the extracted value
|
|
37
38
|
*/
|
|
38
|
-
function getValueFromNode($value) {
|
|
39
|
+
function getValueFromNode(state, $value) {
|
|
39
40
|
const items = [];
|
|
40
41
|
visit($value, (node) => {
|
|
41
42
|
if (node.tagName === 'img' && node.properties?.src) {
|
|
42
|
-
|
|
43
|
+
const { src } = node.properties;
|
|
44
|
+
items.push(src.startsWith('https://') ? src : getAbsoluteUrl(state, src));
|
|
43
45
|
return SKIP;
|
|
44
46
|
}
|
|
45
47
|
if (node.tagName === 'a' && node.properties?.href) {
|
|
46
|
-
|
|
48
|
+
const { href } = node.properties;
|
|
49
|
+
items.push(href.startsWith('https://') ? href : getAbsoluteUrl(state, href));
|
|
47
50
|
return SKIP;
|
|
48
51
|
}
|
|
49
52
|
if (node.type === 'text') {
|
|
@@ -105,7 +108,7 @@ export default function extractSectionMetadata(state) {
|
|
|
105
108
|
}
|
|
106
109
|
parent.properties.className.push(...getStyleClassNames($value));
|
|
107
110
|
} else {
|
|
108
|
-
const value = getValueFromNode($value);
|
|
111
|
+
const value = getValueFromNode(state, $value);
|
|
109
112
|
parent.properties[`data-${name}`] = value;
|
|
110
113
|
}
|
|
111
114
|
}
|