Skip to content

Instructions for Custom HTML tag handling do not work (or: Custom HTML tag handling does not work) #81

@simonpercivall

Description

@simonpercivall

In Inscriptis.__init__, start_tag_handler_dict and _end_tag_handler_dict are set, and at the end of init, ._parse_html_tree is called, going through the tree and calling the handlers.

This means that setting handlers after instantiating Inscriptis does nothing, since the tree has already been handled. And since the handlers are set in __init__, it's also not possible to set them on a subclass, and subclassing Inscriptis and overriding __init__ means having to call self._parse_html_tree() twice.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions