Skip to content
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

add support for class and generic attributes #224

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

Kiyoshika
Copy link
Member

This PR is an extension of my last one where I add support for the class attribute as well as generic attributes (anything other than id and class)

@@ -683,11 +724,8 @@ impl TreeBuilder for DocumentHandle {
fn insert_attribute(&mut self, key: &str, value: &str, element_id: NodeId) -> Result<()> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally I'd like to fetch the node and do the existence/type checks here and pass the node to the other insert methods by reference but couldn't figure out how to properly do it without the borrow checker yelling at me so there's a little bit of code dupe. Open to suggestions

@Kiyoshika Kiyoshika force-pushed the feat/support-other-attributes branch from 49e001b to f9f3834 Compare November 4, 2023 01:53
@Kiyoshika Kiyoshika requested review from neuodev and a team November 4, 2023 01:54
@jaytaph jaytaph merged commit 490ce6d into main Nov 4, 2023
4 checks passed
@jaytaph jaytaph deleted the feat/support-other-attributes branch November 4, 2023 09:10
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.

3 participants