tidy tool for Template Toolkit
修订版 | 9d9df820e560239e7c8f346c3484353712c572b4 (tree) |
---|---|
时间 | 2015-08-18 19:39:43 |
作者 | hylom <hylom@user...> |
Commiter | hylom |
add SWITCH directive support
@@ -93,8 +93,8 @@ class Indenter(object): | ||
93 | 93 | |
94 | 94 | self.debug_print(line) |
95 | 95 | |
96 | - count_if = len(re.findall(u'^(IF|FOREACH)\s', line)) | |
97 | - count_if += len(re.findall(u'\s(IF|FOREACH)\s', line)) | |
96 | + count_if = len(re.findall(u'^(IF|FOREACH|SWITCH)\s', line)) | |
97 | + count_if += len(re.findall(u'\s(IF|FOREACH|SWITCH)\s', line)) | |
98 | 98 | count_if += len(re.findall(u'^BLOCK(\s|;)', line)) |
99 | 99 | count_if += len(re.findall(u'\sBLOCK(\s|;)', line)) |
100 | 100 | count_end = len(re.findall(u'^END(\s|;)', line)) |