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

Pass args to fast html #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Pass args to fast html #1

wants to merge 2 commits into from

Conversation

Kuret
Copy link
Collaborator

@Kuret Kuret commented Feb 13, 2023

For testing partials with fast_html, we needed to pass arguments to its parse method. Since Floki did not support passing arguments to their HTML Parsers an option to pass arguments to the parser module was added.

Note that this only has effect on fast_html, since both mochiweb and html5ever do not support additional arguments.

This was needed because (for example) we had a partial for a table row. When testing this partial on it's own, the output would ignore the tr and td element, since it was 'invalid html' as the parent table element was missing.

This can be solved by passing a context: "table" to fast_html's parse function, only Floki did not support passing along arguments.

@Kuret Kuret added the ready label Feb 13, 2023
@Kuret Kuret force-pushed the pass-args-to-fast_html branch from 516e7f7 to ea4ab5f Compare February 13, 2023 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant