@adobe/helix-md2jcr 1.1.6 → 1.1.7

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,11 @@
1
+ ## [1.1.7](https://github.com/adobe/helix-md2jcr/compare/v1.1.6...v1.1.7) (2025-03-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * empty section metadata ([997b381](https://github.com/adobe/helix-md2jcr/commit/997b381b03dd0d27a0862c85a95d1398561a0985))
7
+ * **release:** force release ([0e09e14](https://github.com/adobe/helix-md2jcr/commit/0e09e14fd189e128eb741c44e3bbb610dddf03e2))
8
+
1
9
  ## [1.1.6](https://github.com/adobe/helix-md2jcr/compare/v1.1.5...v1.1.6) (2025-03-09)
2
10
 
3
11
 
@@ -13,5 +13,6 @@ export default {
13
13
  extends: ['@commitlint/config-conventional'],
14
14
  rules: {
15
15
  'footer-max-line-length': [0],
16
+ 'body-max-line-length': [0, 'always', 100],
16
17
  },
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2jcr",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Helix Service that converts markdown to JCR content structure",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -45,12 +45,14 @@ function sectionHelper(index, children, options) {
45
45
  const cells = findAll(row, (n) => n.type === 'gtCell', true);
46
46
  const key = toString(cells[0]);
47
47
  const value = toString(cells[1]);
48
- const field = getField(model, key);
49
- if (field?.component === 'multiselect') {
50
- const multiValue = value.split(',').map((s) => s.trim()).filter(Boolean);
51
- attributes[key.toLowerCase().replaceAll(' ', '-')] = `[${multiValue.join(',')}]`;
52
- } else {
53
- attributes[key.toLowerCase().replaceAll(' ', '-')] = value;
48
+ if (key.trim() !== '' && value.trim() !== '') {
49
+ const field = getField(model, key);
50
+ if (field?.component === 'multiselect') {
51
+ const multiValue = value.split(',').map((s) => s.trim()).filter(Boolean);
52
+ attributes[key.toLowerCase().replaceAll(' ', '-')] = `[${multiValue.join(',')}]`;
53
+ } else {
54
+ attributes[key.toLowerCase().replaceAll(' ', '-')] = value;
55
+ }
54
56
  }
55
57
  }
56
58
  break;