"""Settings for reformater."""
# pylint: disable=C0301
# flake8: noqa
settings: dict = {
# default indentation
"indent": " ",
# indicates tags whose contents should not be formatted
"ignored_tag_opening": r")([^\n])",
# the contents of these tag blocks will be indented
"tag_indent": r"\{% +?(if|for|block|else|spaceless|compress)|(?:<(?:html|head|body|div|a|nav|ul|ol|dl|li|table|thead|tbody|tr|th|td|blockquote|select|form|option|optgroup|fieldset|legend|label|header|main|section|aside|footer|figure|video|span|p|g|svg|h\d|button))",
# this signals when tags should be unindented (see tags above)
"tag_unindent": r"\{% end|(?:(?:html|head|body|div|a|nav|ul|ol|dl|li|table|thead|tbody|tr|th|td|blockquote|select|form|option|optgroup|fieldset|legend|label|header|main|section|aside|footer|figure|video|span|p|g|svg|h\d|button))",
# these tags should be unindented and next line will be indented
"tag_unindent_line": r"\{% el",
# these tags can sometimes be on one line
"tag_pos_inline": r"\{% if.*endif %\}|\{% block.*endblock %\}||||||||||||||||||||||",
# these tags use raw code and should flatten to column 1
# tabs will be removed inside these tags! use spaces for spacing if needed!
# flatten starting with this tag...
"tag_raw_flat_opening": r"",
# ...stop flattening when you encounter this tag
"tag_raw_flat_closing": r"",
# reduce empty lines greater than x to 1 line
"reduce_extralines_gt": 2,
# if lines are longer than x
"max_line_length": 99,
"format_long_attributes": True,
# pattern used to find attributes in a tag
"attribute_pattern": r"([a-zA-Z-_]+=(?:\".*?\"|\'.*?\')|required|checked)\s*",
"tag_pattern": r"(<\w+?)((?:\n\s*?[^>]+?)+?)(/?\>)",
}