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 include_inputs? option to Floki.text #459

Merged
merged 5 commits into from
May 22, 2023
Merged

Conversation

viniciusmuller
Copy link
Contributor

This pull request adds the include_inputs? option to the Floki.text function.

Example usage:

iex(1)> Floki.text([{"input", [{"type", "date"}, {"value", "2017-06-01"}], []}], include_inputs?: true)
"2017-06-01"

Currently it will add into the resulting text all the values from a list of allowed inputs (excluding things such as checkboxes and radios)

Feel free to review and point any changes you would like @philss

Closes #391

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.

Hey @viniciusmuller 👋

Thank you for the PR! 💜 I added some comments to it.
But overall it looks good!

lib/floki.ex Outdated Show resolved Hide resolved
lib/floki.ex Outdated Show resolved Hide resolved
lib/floki.ex Outdated Show resolved Hide resolved
lib/floki/deep_text.ex Show resolved Hide resolved
lib/floki/text_extractor.ex Outdated Show resolved Hide resolved
lib/floki/text_extractor.ex Outdated Show resolved Hide resolved
viniciusmuller and others added 4 commits May 22, 2023 13:11
Co-authored-by: Philip Sampaio <[email protected]>
Co-authored-by: Philip Sampaio <[email protected]>
Co-authored-by: Philip Sampaio <[email protected]>
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.

:shipit:

@philss philss merged commit 34fb89a into philss:main May 22, 2023
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.

Include input values in the result of Floki.text/2
2 participants