def test_formatting(): # standard line h = HtmlElement() assert _get_text(h) == 'firstEhre sei Gott!last' h.display = Display.block h.margin_before = 1 h.margin_after = 2 print(h) print(_get_text(h)) assert _get_text(h) == 'first\n\nEhre sei Gott!\n\n\nlast' # list bullet without padding_inline h.list_bullet = "* " assert _get_text(h) == 'first\n\n* Ehre sei Gott!\n\n\nlast' # add a padding_inline h.padding_inline = 3 assert _get_text(h) == 'first\n\n * Ehre sei Gott!\n\n\nlast' # and prefixes + suffixes h.prefix = '>>' h.suffix = '<<' assert _get_text(h)== 'first\n\n * >>Ehre sei Gott!<<\n\n\nlast'
def attr_margin_bottom(value: str, html_element: HtmlElement): """Apply the provided bottom margin.""" html_element.margin_after = CssParse._get_em(value)