From fcddf9c04e6e23127c3c45d728dc6751f13315ec Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 2 Aug 2025 14:07:20 +0200 Subject: [PATCH] fix: allow

inside of

Ref https://github.com/webstudio-is/webstudio-community/discussions/241 Never supported heading outline algorithm was never supported and the latest update to html spec allowed paragraphs as part of this removal for lower level subtitles or descriptions. Though indices tables were not updated. I [sent PR](https://github.com/whatwg/html/pull/11524) --- packages/html-data/bin/elements.ts | 6 ++++++ packages/html-data/src/__generated__/elements.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/html-data/bin/elements.ts b/packages/html-data/bin/elements.ts index 65749dc39452..46f10e27d829 100644 --- a/packages/html-data/bin/elements.ts +++ b/packages/html-data/bin/elements.ts @@ -76,6 +76,12 @@ const elementsByTag: Record = {}; if (tag === "summary") { categories.push("interactive"); } + // hgroup also accepts paragraphs + // https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element + // https://github.com/whatwg/html/pull/11524 + if (tag === "hgroup") { + children.push("p"); + } elementsByTag[tag] = { description, categories, diff --git a/packages/html-data/src/__generated__/elements.ts b/packages/html-data/src/__generated__/elements.ts index 5e828dbe3116..71b420a1cde5 100644 --- a/packages/html-data/src/__generated__/elements.ts +++ b/packages/html-data/src/__generated__/elements.ts @@ -273,6 +273,7 @@ export const elementsByTag: Record = { "h5", "h6", "script-supporting elements", + "p", ], }, hr: {