Skip to content

Commit ac6b649

Browse files
authored
fix: allow <p> inside of <hgroup> (#5338)
Ref webstudio-is/webstudio-community#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](whatwg/html#11524)
1 parent 94b1fb9 commit ac6b649

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/html-data/bin/elements.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ const elementsByTag: Record<string, Element> = {};
7676
if (tag === "summary") {
7777
categories.push("interactive");
7878
}
79+
// hgroup also accepts paragraphs
80+
// https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element
81+
// https://github.com/whatwg/html/pull/11524
82+
if (tag === "hgroup") {
83+
children.push("p");
84+
}
7985
elementsByTag[tag] = {
8086
description,
8187
categories,

packages/html-data/src/__generated__/elements.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)