@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.js CHANGED
@@ -6992,7 +6992,7 @@ function formatScalar(v) {
6992
6992
  return "[" + v.map(formatScalar).join(SEP) + "]";
6993
6993
  }
6994
6994
  if (typeof v === "object") {
6995
- return "{" + Object.entries(v).map(([key, value]) => `${key}: ${formatScalar(value)}`).join(SEP) + "}";
6995
+ return "{" + Object.entries(v).map(([key, value]) => `${isIdentifier(key) ? key : `"${key}"`}: ${formatScalar(value)}`).join(SEP) + "}";
6996
6996
  }
6997
6997
  return JSON.stringify(v);
6998
6998
  }
@@ -7266,10 +7266,11 @@ function* formatNode(n, o = {}) {
7266
7266
  yield* formatChildren(n, no);
7267
7267
  break;
7268
7268
  }
7269
- case "error": {
7270
- console.error(n);
7269
+ case "comment": {
7270
+ yield "<!-- " + n.attributes.content + " -->\n";
7271
7271
  break;
7272
7272
  }
7273
+ case "error":
7273
7274
  case "node":
7274
7275
  break;
7275
7276
  }