-
-
Notifications
You must be signed in to change notification settings - Fork 73
Add html-content-model-conformance rule
#1030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add html-content-model-conformance rule
#1030
Conversation
|
The commit ca3758b adds support for ERBBlockNode and ERBContentNode with the Extracting helper methods via regex is getting tricky. |
|
Great, thank you so much for exploring this @kozy4324!
We can leave out the If you want, we can keep the tests and use |
|
Got it. I’ll keep the scope limited to the |
This PR implements a content model–based validation approach as discussed in #267, focusing on a small and practical subset of checks derived from the HTML specification.
What this PR does
This implementation checks whether child elements are allowed under a given parent based on its content model, without aiming for full structural validation.
It currently supports the following patterns:
<a>)<ul>→<li>)<div>,<span>).What this PR intentionally does not do
The following are intentionally out of scope for this PR:
<head>html-head-only-elementsandhtml-body-only-elementsrules.I’d be happy to adjust this if you have any feedback or suggestions. Thank you.