Skip to content

Custom Tag support and field overhaul #2285

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

Closed
jhy opened this issue Mar 12, 2025 · 1 comment
Closed

Custom Tag support and field overhaul #2285

jhy opened this issue Mar 12, 2025 · 1 comment
Assignees
Labels
fixed An {bug|improvement} that has been {fixed|implemented} improvement An improvement / new feature idea
Milestone

Comments

@jhy
Copy link
Owner

jhy commented Mar 12, 2025

I'm planning on adding Custom Tag support, that will allow various tag properties (white space formating, void, self-closing, etc) to be configured before the Parser is run.

Currently we infer these properties for unrecognized HTML tags (in the HTML tree builder) and for all tags in the XML tree builder.

Would look to have a new Tag instance creator, and a way to provide the Parser with the list of tags. In the case of HTML that could be by modifying the default list (probably extending). In XML it would be the entire set.

These would impact the parse when possible in the HTML5 tree builder as most rules don't come from tag properties but from explicit rules. But more impactful for XML tree builder.

And will particularly help for the XML tree builder.

@jhy jhy added improvement An improvement / new feature idea planned Things to get to in the near term labels Mar 12, 2025
jhy added a commit that referenced this issue Mar 29, 2025
Allows custom tag configuration. #2285

This first pass keeps all the existing tag semantics. I am going to clean it up as part of revamping the pretty printer (#2286)
@jhy
Copy link
Owner Author

jhy commented Apr 3, 2025

I'm working on this in the develop branch.

@jhy jhy added this to the 1.20.1 milestone Apr 14, 2025
@jhy jhy self-assigned this Apr 14, 2025
jhy added a commit that referenced this issue Apr 15, 2025
Allows parsing of pseudo HTML with the HTML tag set, without using the HTML TreeBuilder rules

For #2285
@jhy jhy added fixed An {bug|improvement} that has been {fixed|implemented} and removed planned Things to get to in the near term labels Apr 15, 2025
@jhy jhy closed this as completed Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed An {bug|improvement} that has been {fixed|implemented} improvement An improvement / new feature idea
Projects
None yet
Development

No branches or pull requests

1 participant