@markdoc/markdoc 0.5.9 → 0.5.10

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
@@ -7308,8 +7308,9 @@ function* formatNode(n, o = {}) {
7308
7308
  break;
7309
7309
  }
7310
7310
  case "blockquote": {
7311
- const prefix = ">" + SPACE;
7312
- yield n.children.map((child) => format(child, no).trimStart()).map((d) => NL + indent + prefix + d).join(indent + prefix);
7311
+ const prefix = NL + indent + ">" + SPACE;
7312
+ const inner = n.children.map((child) => format(child, { ...no, indent: 0 }).trim()).join(NL + NL);
7313
+ yield prefix + inner.split(NL).join(prefix) + NL;
7313
7314
  break;
7314
7315
  }
7315
7316
  case "hr": {
@@ -8335,8 +8336,9 @@ function block(state, startLine, endLine, silent) {
8335
8336
  const lastPossible = state.src.slice(0, finish).trim().length;
8336
8337
  if (!tagEnd || tagEnd < lastPossible - CLOSE.length) return false;
8337
8338
  const contentStart = start + OPEN.length;
8338
- const content = state.src.slice(contentStart, tagEnd).trim();
8339
8339
  const lines = state.src.slice(start, tagEnd + CLOSE.length).split("\n").length;
8340
+ const text2 = state.getLines(startLine, startLine + lines, 0, false);
8341
+ const content = text2.slice(text2.indexOf(OPEN) + OPEN.length, findTagEnd(text2)).trim();
8340
8342
  if (content[0] === "$") return false;
8341
8343
  if (silent) return true;
8342
8344
  const token = createToken(state, content, contentStart);