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

Fix return of html.fragments_fromstring #43

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Fix return of html.fragments_fromstring #43

merged 2 commits into from
Apr 4, 2024

Conversation

Wuestengecko
Copy link
Contributor

If the string contains leading text, the first element of the returned list will be a str. Only if no_leading_text=True was specified can we guarantee that there will be no str fragment at the beginning.

Related documentation: https://lxml.de/apidoc/lxml.html.html#lxml.html.fragments_fromstring

Wuestengecko and others added 2 commits April 4, 2024 13:36
If the string contains leading text, the first element of the returned
list will be a `str`. Only if `no_leading_text=True` was specified can
we guarantee that there will be no `str` fragment at the beginning.
@abelcheung
Copy link
Owner

You're right, I have forgotten the lxml.html counterpart of fragments_fromstring().

@abelcheung abelcheung merged commit 1249b44 into abelcheung:main Apr 4, 2024
1 check passed
@abelcheung abelcheung added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants