From ebb4abd350a8fbd104cf46e0f9313a308e0c58eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Sun, 22 Jun 2025 00:38:33 +0700 Subject: [PATCH 1/3] Add script-supporting elements https://html.spec.whatwg.org/multipage/dom.html#script-supporting-elements-2 --- lib/html_types.mli | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/html_types.mli b/lib/html_types.mli index 66b0097d5..485cd8d06 100644 --- a/lib/html_types.mli +++ b/lib/html_types.mli @@ -427,6 +427,9 @@ type formassociated = [ | listed | `Progress | `Meter | `Label ] type subresource_integrity = [ | `Crossorigin | `Integrity ] (** @see *) +type script_supporting = [ | `Script | `Template ] +(** @see *) + (** Transparent elements. Such elements have a part of they children in their data and behaves like them. We could do something like [a: 'a elt list -> 'a elt] From a786a08c91d1e72eb19b75d77b8367c1fd452dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Sun, 22 Jun 2025 00:50:47 +0700 Subject: [PATCH 2/3] Allow `
` & script-supporting element in `
` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > Content model: > Either: Zero or more groups each consisting of one or more dt elements followed by one or more dd elements, optionally intermixed with script-supporting elements. > Or: One or more div elements, optionally intermixed with script-supporting elements. — https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element --- lib/html_types.mli | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/html_types.mli b/lib/html_types.mli index 485cd8d06..1fd78b446 100644 --- a/lib/html_types.mli +++ b/lib/html_types.mli @@ -1426,12 +1426,12 @@ type dialog_content_fun = [ | flow5 ] type dialog_attrib = [ | common | `Open ] -(* NAME: div, KIND: star, TYPE: [= common ], [= flow5 ], [=`Div], ARG: [= flow5 ], ATTRIB: OUT: [=`Div] *) +(* NAME: div, KIND: star, TYPE: [= common ], [= flow5 | `Dd | `Dt ], [=`Div], ARG: [= flow5 ], ATTRIB: OUT: [=`Div] *) type div = [ | `Div ] -type div_content = [ | flow5 ] +type div_content = [ | flow5 | `Dd | `Dt ] -type div_content_fun = [ | flow5 ] +type div_content_fun = [ | flow5 | `Dd | `Dt ] type div_attrib = [ | common ] @@ -1482,9 +1482,9 @@ type dt_attrib = [ | common ] type dl = [ | `Dl ] -type dl_content = [ | `Dt | `Dd ] +type dl_content = [ | script_supporting | `Div | `Dd | `Dt ] -type dl_content_fun = [ | `Dt | `Dd ] +type dl_content_fun = [ | script_supporting | `Div | `Dd | `Dt ] type dl_attrib = [ | common ] From 948c3a2900826752be9c6165ab0a075b9bb71fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Tue, 2 Dec 2025 00:18:44 +0700 Subject: [PATCH 3/3] update CHANGES.md --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index f914dc5c1..6b66fd318 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,9 @@ (#333 by Martin @MBodin Bodin) * Fix typo for `subresource` & English orthographic fixes (#345 by toastal) +* Allow `
` to wrap `
` / `
` as well as script-supporting elements + in `
` + (#344 by toastal) # 4.6.0