@markdoc/markdoc 0.1.10 → 0.1.11

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/dist/index.mjs CHANGED
@@ -6968,7 +6968,7 @@ function formatScalar(v) {
6968
6968
  return "[" + v.map(formatScalar).join(SEP) + "]";
6969
6969
  }
6970
6970
  if (typeof v === "object") {
6971
- return "{" + Object.entries(v).map(([key, value]) => `${key}: ${formatScalar(value)}`).join(SEP) + "}";
6971
+ return "{" + Object.entries(v).map(([key, value]) => `${isIdentifier(key) ? key : `"${key}"`}: ${formatScalar(value)}`).join(SEP) + "}";
6972
6972
  }
6973
6973
  return JSON.stringify(v);
6974
6974
  }
@@ -7242,10 +7242,11 @@ function* formatNode(n, o = {}) {
7242
7242
  yield* formatChildren(n, no);
7243
7243
  break;
7244
7244
  }
7245
- case "error": {
7246
- console.error(n);
7245
+ case "comment": {
7246
+ yield "<!-- " + n.attributes.content + " -->\n";
7247
7247
  break;
7248
7248
  }
7249
+ case "error":
7249
7250
  case "node":
7250
7251
  break;
7251
7252
  }