Skip to content

Conversation

domenic
Copy link
Member

@domenic domenic commented Sep 10, 2025

This supports the work in whatwg/html#11392 with a new processor found in variables.rs, documented there.

This also updates the parser to store the line numbers for each element, for use in error messages.

For now this contains commented-out code to error on <var>s outside of algorithm and var-scope scopes, since CI will prevent us from merging a html-build change that cannot build the current main branch of whatwg/html. After the HTML PR is merged, we can uncomment that code.

@jmdyck you may not want to review all the code, but the tests at the bottom of variables.rs might be worthwhile checking over.

@domenic
Copy link
Member Author

domenic commented Sep 10, 2025

I guess there will be a chicken-egg problem with whether whatwg/html#11392 or this lands first, since html-build will refuse to publish unless the "Run against whatwg/html" succeeds, and html will not let us merge a PR which fails validation.

I suppose the best solution would be to land the attribute stripping/conversion functionality first, then add the variable checking afterward.

I'll probably end up doing a simpler version of that by commenting out some parts of the error-on-orphaned-vars code, landing this, landing whatwg/html#11392, then landing a second PR that uncomments that check.

This supports the work in whatwg/html#11392 with a new processor found in variables.rs, documented there.

This also updates the parser to store the line numbers for each element, for use in error messages.

For now this contains commented-out code to error on `<var>`s outside of `algorithm` and `var-scope` scopes, since CI will prevent us from merging a html-build change that cannot build the current main branch of whatwg/html. After the HTML PR is merged, we can uncomment that code.
@domenic domenic merged commit adb2e6f into main Sep 25, 2025
2 checks passed
@domenic domenic deleted the algorithm branch September 25, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant