Breaking changes
-
HTMLno longer inherits fromstr. It now inherits fromcollections.UserString. This was done to avoid confusion betweenstrandHTMLobjects. (#86) -
TagListno longer inherits fromlist. It now inherits fromcollections.UserList. This was done to avoid confusion betweenlistandTagListobjects. (#97) -
TagandTagList's method.get_html_string()now both returnstrinstead ofHTML. (#86) -
Strings added to
HTMLobjects, now returnHTMLobjects. E.g.HTML_value + str_valueandstr_value + HTML_valueboth returnHTMLobjects. To maintain astrresult, callstr()on yourHTMLobjects before adding them to other strings values. (#86) -
Items added to
TagListobjects, now returnTagListobjects. E.g.TagList_value + arr_valueandarr_value + TagList_valueboth return newTagListobjects. To maintain alistresult, calllist()on yourTagListobjects before combining them to other list objects. (#97)
New features
-
Exported
ReprHtmlprotocol class. If an object has a_repr_html_method, then it is of instanceReprHtml. (#86) -
Exported
is_tag_node()andis_tag_child()functions that utilizetyping.TypeIsto narrowTagNodeandTagChildtype variables, respectively. (#86) -
Exported
consolidate_attrs(*args, **kwargs)function. This function will combine theTagAttrs(supplied in*args) withTagAttrValues(supplied in**kwargs) into a singleTagAttrsobject. In addition, it will also return all*argsthat are not dictionary as a list of unalteredTagChildobjects. (#86) -
The
Tagmethod.add_style(style=)added support forHTMLobjects in addition tostrvalues. (#86)
Bug fixes
- Fixed an issue with
HTMLTextDocument()returning extractedHTMLDependency()s in a non-determistic order. (#95)