domma-cms 1.66.1 → 1.66.2

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,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.66.2] - 2026-11-13
4
+
5
+ ### Fixed
6
+
7
+ - **Your own HTML inside a `[row]` or `[grid]` renders as written again.** Since 1.64.0 the body of a row or grid was run through Markdown, so a cell written as a link holding a heading (`<a class="panel"><h2>…</h2></a>`) was wrapped in a paragraph, and the browser pushed its content out as extra cells - the first card of a row came out as three stray pieces and an empty box. Rows and grids keep their body as HTML, as they did before; `[col]` cells, cards and nested grids are unchanged.
8
+
3
9
  ## [1.66.1] - 2026-11-13
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.66.1",
3
+ "version": "1.66.2",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -2466,6 +2466,11 @@ function verticalAlignClasses(attrs) {
2466
2466
  function processGridBlocks(markdown, depth = 0) {
2467
2467
  if (depth >= 64) return markdown;
2468
2468
  const {scrubbed, restore} = scrubCodeRegions(markdown);
2469
+ // A [row]'s and a [grid]'s body is HTML, kept as written: the cells are [col]s (rendered below) or
2470
+ // the author's own elements. It is NOT run through Markdown here - Markdown wraps a line that opens
2471
+ // with an inline element (<a class="panel">…) in a <p>, the browser then closes that <p> at the
2472
+ // first heading inside, and the cell's content lands outside it as cells of its own. Cards and
2473
+ // inline tags in the body are rendered by whoever holds it: the enclosing [col], or the page.
2469
2474
  const renderers = {
2470
2475
  background: (attrStr, inner) => {
2471
2476
  const css = backgroundStyle(parseShortcodeAttrs(attrStr));
@@ -2501,7 +2506,7 @@ function processGridBlocks(markdown, depth = 0) {
2501
2506
  const revealDirection = attrs['reveal-direction'] ? ` data-reveal-direction="${escapeAttr(attrs['reveal-direction'])}"` : '';
2502
2507
  const revealReplay = isTruthyAttr(attrs['reveal-replay']) ? ' data-reveal-replay="true"' : '';
2503
2508
  const tilt = isTruthyAttr(attrs.tilt) ? ' data-tilt="true"' : '';
2504
- return `<div class="${classes.join(' ')}"${id}${reveal}${revealMode}${revealAnimation}${revealDuration}${revealStagger}${revealDelay}${revealDirection}${revealReplay}${tilt}>${markedBody(processCardBlocks(processInlineShortcodes(inner.trim())))}</div>\n`;
2509
+ return `<div class="${classes.join(' ')}"${id}${reveal}${revealMode}${revealAnimation}${revealDuration}${revealStagger}${revealDelay}${revealDirection}${revealReplay}${tilt}>${inner}</div>\n`;
2505
2510
  },
2506
2511
  grid: (attrStr, inner) => {
2507
2512
  const attrs = parseShortcodeAttrs(attrStr);
@@ -2515,7 +2520,7 @@ function processGridBlocks(markdown, depth = 0) {
2515
2520
  if (attrs.class) classes.push(escapeAttr(attrs.class));
2516
2521
  if (attrs.fullwidth === 'true') classes.push('grid-breakout');
2517
2522
  const id = attrs.id ? ` id="${escapeAttr(attrs.id)}"` : '';
2518
- return `<div class="${classes.join(' ')}"${id}>${markedBody(processCardBlocks(processInlineShortcodes(inner.trim())))}</div>\n`;
2523
+ return `<div class="${classes.join(' ')}"${id}>${inner}</div>\n`;
2519
2524
  }
2520
2525
  };
2521
2526
  let result = scrubbed;