Allow <div> & script-supporting element in <dl>#344
Open
toastal wants to merge 3 commits intoocsigen:masterfrom
Open
Allow <div> & script-supporting element in <dl>#344toastal wants to merge 3 commits intoocsigen:masterfrom
<div> & script-supporting element in <dl>#344toastal wants to merge 3 commits intoocsigen:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the HTML type definitions to align with the WHATWG HTML specification for the <dl> (description list) element, allowing more flexible content models as specified in the HTML standard.
Key changes:
- Introduces a new
script_supportingtype for script-supporting elements (<script>and<template>) - Allows
<div>and script-supporting elements as direct children of<dl>elements - Allows
<dd>and<dt>elements as children of<div>elements (specifically when<div>is used within<dl>)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/html_types.mli | Adds script_supporting type and updates dl_content, dl_content_fun, div_content, and div_content_fun to implement the WHATWG HTML spec for description lists |
| CHANGES.md | Documents the changes in the changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5083f92 to
ac57f24
Compare
> 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
Contributor
Author
|
ping @smorimoto @Drup … why do I need to be concerned with Opam Docs? I don’t understand what CI is trying to tell me & I can’t just run it locally since it’s tied up in GitHub Action dependencies. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element
Description list allow
<div>& script-supporting elements—not just<dd>&<dt>elements.1
Footnotes
Please consider giving up MS GitHub or offering a non-proprietary, non-US-corporate-controlled mirror for this free software project. I wish to delete this Microsoft account in the future, but I need more projects like this to support alternative methods to send patches & contribute. ↩