disallow negative indent when there is a tag missmatch.

This commit is contained in:
Christopher Pickering 2021-08-02 13:06:44 -05:00
parent cd835b79f6
commit 969dd046bf
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84

View file

@ -97,7 +97,7 @@ def indent_html(rawcode):
and is_block_raw is False
or re.search(ignored_tag_closing, item, re.IGNORECASE)
):
indent_level = indent_level - 1
indent_level = max(indent_level - 1, 0)
tmp = (indent * indent_level) + item + "\n"
blank_counter = 0