@adobe/helix-md2jcr 1.1.29 → 1.1.31
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
|
+
## [1.1.31](https://github.com/adobe/helix-md2jcr/compare/v1.1.30...v1.1.31) (2025-08-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* custom sections/normal sections should identify their model ([#137](https://github.com/adobe/helix-md2jcr/issues/137)) ([2d69b7a](https://github.com/adobe/helix-md2jcr/commit/2d69b7a84dfd4717cd1fe3757a0c47dff28ccb6a)), closes [#136](https://github.com/adobe/helix-md2jcr/issues/136)
|
|
7
|
+
|
|
8
|
+
## [1.1.30](https://github.com/adobe/helix-md2jcr/compare/v1.1.29...v1.1.30) (2025-08-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* ignore any inline images ([#135](https://github.com/adobe/helix-md2jcr/issues/135)) ([be36770](https://github.com/adobe/helix-md2jcr/commit/be3677000b55c3e19d0f05fff7223c9f227e6bfc)), closes [#134](https://github.com/adobe/helix-md2jcr/issues/134)
|
|
14
|
+
|
|
1
15
|
## [1.1.29](https://github.com/adobe/helix-md2jcr/compare/v1.1.28...v1.1.29) (2025-07-29)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-md2jcr",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.31",
|
|
4
4
|
"description": "Helix Service that converts markdown to JCR content structure",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"xml-formatter": "^3.6.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@adobe/eslint-config-helix": "3.0.
|
|
58
|
-
"@adobe/helix-mediahandler": "2.7.
|
|
57
|
+
"@adobe/eslint-config-helix": "3.0.9",
|
|
58
|
+
"@adobe/helix-mediahandler": "2.7.23",
|
|
59
59
|
"@commitlint/cli": "^19.6.1",
|
|
60
60
|
"@commitlint/config-conventional": "^19.6.0",
|
|
61
61
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"eslint-plugin-import": "2.32.0",
|
|
71
71
|
"husky": "^9.1.7",
|
|
72
72
|
"junit-report-builder": "5.1.1",
|
|
73
|
-
"lint-staged": "16.1.
|
|
73
|
+
"lint-staged": "16.1.5",
|
|
74
74
|
"mocha": "11.7.1",
|
|
75
75
|
"mocha-multi-reporters": "1.5.1",
|
|
76
76
|
"nock": "13.5.6",
|
|
@@ -134,7 +134,10 @@ function findSectionMetadata(children, models) {
|
|
|
134
134
|
const result = processMetadataRows(rows, model);
|
|
135
135
|
|
|
136
136
|
return {
|
|
137
|
-
attributes:
|
|
137
|
+
attributes: {
|
|
138
|
+
...result.attributes,
|
|
139
|
+
model: sectionModelId || 'section',
|
|
140
|
+
},
|
|
138
141
|
modelFields: result.modelFields,
|
|
139
142
|
};
|
|
140
143
|
}
|
|
@@ -146,6 +149,9 @@ function findSectionMetadata(children, models) {
|
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
return {
|
|
152
|
+
attributes: {
|
|
153
|
+
model: sectionModel.id,
|
|
154
|
+
},
|
|
149
155
|
modelFields: getModelFieldNames(sectionModel),
|
|
150
156
|
};
|
|
151
157
|
}
|
|
@@ -13,9 +13,16 @@ import Handlebars from 'handlebars';
|
|
|
13
13
|
import { encodeHtml } from '../../utils.js';
|
|
14
14
|
|
|
15
15
|
function image(context) {
|
|
16
|
-
const uniqueName = Handlebars.helpers.nameHelper.call(context, 'image');
|
|
17
16
|
const { alt, url } = context;
|
|
18
17
|
|
|
18
|
+
// discard any inline data images
|
|
19
|
+
if (url.startsWith('data:')) {
|
|
20
|
+
console.info(`[WARN] Discaring inline data image: ${url}`);
|
|
21
|
+
return '\n';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const uniqueName = Handlebars.helpers.nameHelper.call(context, 'image');
|
|
25
|
+
|
|
19
26
|
const encoded = encodeHtml(url);
|
|
20
27
|
return `<image${uniqueName} sling:resourceType="core/franklin/components/image/v1/image"
|
|
21
28
|
jcr:primaryType="nt:unstructured" image="${encoded}" imageAlt="${encodeHtml(alt)}"/>\n`;
|
|
@@ -16,8 +16,10 @@ const image = {
|
|
|
16
16
|
|
|
17
17
|
getProperties: (node) => {
|
|
18
18
|
const imageNode = find(node, { type: 'image' });
|
|
19
|
+
|
|
20
|
+
// if the image url starts with data: then return an empty string for image url
|
|
19
21
|
return {
|
|
20
|
-
url: imageNode?.url || '',
|
|
22
|
+
url: imageNode?.url?.startsWith('data:') ? '' : imageNode?.url || '',
|
|
21
23
|
alt: imageNode?.alt || '',
|
|
22
24
|
label: imageNode?.label || '',
|
|
23
25
|
};
|