# Path: draftjs_exporter/engines/base.py
# class DOMEngine(object):
#     def create_tag(type_: Tag, attr: Optional[Attr] = None) -> Any:
#     def parse_html(markup: HTML) -> Element:
#     def append_child(elt: Element, child: Element) -> Any:
#     def render(elt: Element) -> HTML:
#     def render_debug(elt: Element) -> HTML:
# 
# Path: draftjs_exporter/types.py
# HTML = str


import re
from typing import Optional
from draftjs_exporter.engines.base import Attr, DOMEngine
from draftjs_exporter.types import HTML, Element, Tag
    from bs4 import BeautifulSoup


try:

    # Cache empty soup so we can create tags in isolation without the performance overhead.
    soup = BeautifulSoup("", "html5lib")
except ImportError:
    pass

RENDER_RE = re.compile(r"</?(fragment|body|html|head)>")
RENDER_DEBUG_RE = re.compile(r"</?(body|html|head)>")



# Path: draftjs_exporter/engines/base.py
# class DOMEngine(object):
#     def create_tag(type_: Tag, attr: Optional[Attr] = None) -> Any:
#     def parse_html(markup: HTML) -> Element:
#     def append_child(elt: Element, child: Element) -> Any:
#     def render(elt: Element) -> HTML:
#     def render_debug(elt: Element) -> HTML:
# 
# Path: draftjs_exporter/types.py
# HTML = str


# Path: draftjs_exporter/engines/html5lib.py
import re
from typing import Optional
from draftjs_exporter.engines.base import Attr, DOMEngine
from draftjs_exporter.types import HTML, Element, Tag
    from bs4 import BeautifulSoup



try:

    # Cache empty soup so we can create tags in isolation without the performance overhead.
    soup = BeautifulSoup("", "html5lib")
except ImportError:
    pass

RENDER_RE = re.compile(r"</?(fragment|body|html|head)>")
RENDER_DEBUG_RE = re.compile(r"</?(body|html|head)>")



class DOM_HTML5LIB(DOMEngine):