@adobe/helix-md2jcr 1.2.11 → 1.2.13

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.2.13](https://github.com/adobe/helix-md2jcr/compare/v1.2.12...v1.2.13) (2026-02-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * metadata content needs to be encoded ([#186](https://github.com/adobe/helix-md2jcr/issues/186)) ([bea5476](https://github.com/adobe/helix-md2jcr/commit/bea5476460c6d3daf21e79299f41af1c08389ac7))
7
+
8
+ ## [1.2.12](https://github.com/adobe/helix-md2jcr/compare/v1.2.11...v1.2.12) (2026-01-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update dependency @adobe/remark-gridtables to v3.0.17 ([#184](https://github.com/adobe/helix-md2jcr/issues/184)) ([837a93b](https://github.com/adobe/helix-md2jcr/commit/837a93b42da128b82ae580259dfef8d2df7171d3))
14
+
1
15
  ## [1.2.11](https://github.com/adobe/helix-md2jcr/compare/v1.2.10...v1.2.11) (2026-01-14)
2
16
 
3
17
 
package/baseline-tests.sh CHANGED
@@ -48,6 +48,24 @@ ARGS=""
48
48
  [ "$VERBOSE" = "true" ] && ARGS="$ARGS -v"
49
49
  [ "$DECODE" = "true" ] && ARGS="$ARGS -d"
50
50
 
51
+ # Function to check if spec-specific files exist, otherwise use component-*.json fallback
52
+ get_ue_args() {
53
+ local md_file="$1"
54
+ local dir=$(dirname "$md_file")
55
+ local base=$(basename "$md_file" .md)
56
+
57
+ # Check if spec-specific files exist
58
+ if [ -f "$dir/${base}-models.json" ] || [ -f "$dir/_${base}.json" ]; then
59
+ # Spec-specific files exist, no need for -ue flag
60
+ echo ""
61
+ elif [ -f "$dir/component-models.json" ]; then
62
+ # Fall back to component-*.json files
63
+ echo "-ue $dir"
64
+ else
65
+ echo ""
66
+ fi
67
+ }
68
+
51
69
  # If a specific file is provided, process only that file
52
70
  if [ -n "$SPECIFIC_FILE" ]; then
53
71
  if [ ! -f "$SPECIFIC_FILE" ]; then
@@ -58,7 +76,10 @@ if [ -n "$SPECIFIC_FILE" ]; then
58
76
  echo "Processing $SPECIFIC_FILE..."
59
77
  [ "$VERBOSE" = "true" ] && echo
60
78
 
61
- node "$NODE_SCRIPT" "$SPECIFIC_FILE" $ARGS 2>/dev/null
79
+ # Get any additional UE args for fallback
80
+ UE_ARGS=$(get_ue_args "$SPECIFIC_FILE")
81
+
82
+ node "$NODE_SCRIPT" "$SPECIFIC_FILE" $ARGS $UE_ARGS
62
83
 
63
84
  if [ $? -ne 0 ]; then
64
85
  echo "Error processing $SPECIFIC_FILE with $NODE_SCRIPT."
@@ -89,7 +110,10 @@ for MD_FILE in $MD_FILES; do
89
110
  # if VERBOSE is true then echo a new line
90
111
  [ "$VERBOSE" = "true" ] && echo
91
112
 
92
- node "$NODE_SCRIPT" "$MD_FILE" $ARGS 2>/dev/null
113
+ # Get any additional UE args for fallback
114
+ UE_ARGS=$(get_ue_args "$MD_FILE")
115
+
116
+ node "$NODE_SCRIPT" "$MD_FILE" $ARGS $UE_ARGS 2>/dev/null
93
117
 
94
118
  # Check if the Node.js script executed successfully
95
119
  if [ $? -ne 0 ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2jcr",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "description": "Helix Service that converts markdown to JCR content structure",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  "@adobe/fetch": "4.2.3",
35
35
  "@adobe/helix-markdown-support": "7.1.17",
36
36
  "@adobe/helix-shared-process-queue": "3.1.5",
37
- "@adobe/remark-gridtables": "3.0.16",
37
+ "@adobe/remark-gridtables": "3.0.17",
38
38
  "entities": "^6.0.0",
39
39
  "github-slugger": "2.0.0",
40
40
  "handlebars": "^4.7.8",
@@ -57,7 +57,7 @@
57
57
  "xml-formatter": "^3.6.3"
58
58
  },
59
59
  "devDependencies": {
60
- "@adobe/eslint-config-helix": "3.0.15",
60
+ "@adobe/eslint-config-helix": "3.0.17",
61
61
  "@adobe/helix-mediahandler": "2.9.5",
62
62
  "@commitlint/cli": "^19.6.1",
63
63
  "@commitlint/config-conventional": "^19.6.0",
@@ -12,7 +12,7 @@
12
12
 
13
13
  /**
14
14
  * The Component class represents a single component located in the
15
- * component-definitions.json file.
15
+ * component-definition.json file.
16
16
  */
17
17
  class Component {
18
18
  /**
@@ -17,7 +17,7 @@
17
17
  import Component from './Component.js';
18
18
 
19
19
  /**
20
- * Get the components from the definitions object, (component-definitions.json).
20
+ * Get the components from the definitions object, (component-definition.json).
21
21
  * @param {DefinitionDef} definitions The Definitions object.
22
22
  * @returns {Component[]} An array of Component objects.
23
23
  */
@@ -64,6 +64,8 @@ function buildPageMetadata(table, models) {
64
64
  if (isMultiField(field)) {
65
65
  value = value.split(',').map((v) => encodeHTMLEntities(v.trim()));
66
66
  value = value.length > 0 ? `[${value.join(',')}]` : '';
67
+ } else {
68
+ value = encodeHTMLEntities(value);
67
69
  }
68
70
  metadata[field.name] = value;
69
71
  }