doc: html.fragment_fromstring create_parent
Bug #1301202 reported by
Gábor Farkas
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
scoder |
Bug Description
when you use the create_parent=True option of html.fragment_
then it is not an error if there is more than one element, it will be wrapped
into a new parent element. but the documentation does not say so.
about "create_parent" it only says:
"""
If create_parent is true (or is a tag name) then a parent node
will be created to encapsulate the HTML in a single element. In
this case, leading or trailing text is allowed.
"""
i think the documentation should be updated that in this case also multiple elements
are allowed and handled.
i am planning to use this feature, but i'm a little hesitant because it is "undocumented"
To post a comment you must log in.
I clarified the docs, multiple elements are ok in this case.
https:/ /github. com/lxml/ lxml/commit/ 8bbadc250fb838c 79ad9dcce758bef c1c4f30664