mirror of https://github.com/zulip/zulip.git
tools: Document indentation policy.
This commit is contained in:
parent
1509e7f355
commit
f8e35b5b36
|
@ -27,7 +27,12 @@ def shift_indents_to_the_next_tokens(tokens: List[Token]) -> None:
|
|||
|
||||
|
||||
def token_allows_children_to_skip_indents(token: Token) -> bool:
|
||||
# For legacy reasons we don't always indent blocks.
|
||||
# To avoid excessive indentation in templates with other
|
||||
# conditionals, we don't require extra indentation for template
|
||||
# logic blocks don't contain further logic as direct children.
|
||||
|
||||
# Each blocks are excluded from this rule, since we want loops to
|
||||
# stand out.
|
||||
if token.tag == "each":
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue