def self_closing_elements_are_never_empty():
    assert_equal(
        [html.self_closing_element("br")],
        html.strip_empty([html.self_closing_element("br")]))
예제 #2
0
 def convert_image(image):
     with image.open() as image_file:
         return [html.self_closing_element("img", {"alt": image_file.read().decode("ascii")})]
예제 #3
0
 def convert_image(image):
     with image.open() as image_file:
         return [
             html.self_closing_element(
                 "img", {"alt": image_file.read().decode("ascii")})
         ]