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

Move data extraction for selector matching #524

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

ypconstante
Copy link
Contributor

Today in the Selector module, each match function has it's code to extract the node type or attributes from HTMLNode to run it's matching condition.

To make it easier to implement #515, this PR moves this data extraction to common functions, which will avoid having to deal on each type of match with HTMLNode or html tuples + attributes as maps or attributes as lists.

Copy link
Owner

@philss philss left a comment

Choose a reason for hiding this comment

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

LGTM! I just added a minor suggestion :)

lib/floki/selector.ex Outdated Show resolved Hide resolved
@philss philss merged commit 1884b0f into philss:main Jan 22, 2024
9 checks passed
@ypconstante ypconstante deleted the selector-node-data-extraction branch January 22, 2024 22:44
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.

2 participants