Skip to content

feat: add support for processing instructions - #145

Open
Delta-official wants to merge 2 commits into
untitaker:mainfrom
Delta-official:processing-instructions
Open

Delta-official wants to merge 2 commits into
untitaker:mainfrom
Delta-official:processing-instructions

Conversation

@Delta-official

@Delta-official Delta-official commented Sep 19, 2026 •

Copy link
Copy Markdown

Adds support for processing instructions (<?target data?>). This probably needs a major bump as the Emitter trait got new methods on it and the enums for events got a new variant.

Sadly the html5lib-tests tests don't pass (at least not yet) because they rely on the old behaviour of interpreting every tag starting with a <? as a bogus comment. Not really sure what to do about this; I might try upstreaming the required changes.

Closes #144

@untitaker

Copy link
Copy Markdown
Owner

i think there have been some changes to html5lib-tests where these tests are now maintained in another repo. you'd have to search the issue tracker for it. if so, i would really like to switch to that repo

@Delta-official

Copy link
Copy Markdown
Author

From the looks of it, the tokenizer tests never ended up getting moved to wpt, so I'm unsure what to do

@untitaker

Copy link
Copy Markdown
Owner

i've caught up with the changes in html5lib-tests and it seems that tokenizer tests are still "supposed to be" maintained. so i think the right course of action is to file a PR upstream, then update the git submodule here to use these new tests.

this will then break the tree builder tests in html5gum. i'm fine with either having a separate html5lib-tests checkout for those, or if you want to take on the wpt migration that would be greatly apprechiated too (i haven't checked how much work that would be)

@Delta-official

Copy link
Copy Markdown
Author

Tree builder tests should be compatible with the ones in html5lib-tests (as they use similar, if not identical, formats), so I think I'll try to do the migration for tree building tests

@Delta-official

Copy link
Copy Markdown
Author

Funnily enough, I'm blocked by html5ever's lack of processing instruction support, so I'll have to fix that there first to migrate the tree building tests :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support processing tags

2 participants