Add indentation to case-block

This commit is contained in:
Dennis Potter 2021-06-24 01:05:55 +02:00
parent 31179eeecc
commit 3089edc20d
Signed by: Dennis
GPG Key ID: 186A8AD440942BAF

View File

@ -126,7 +126,7 @@ class Component():
# Define triggers for which the indentation level will increment or
# decrement on the next line
trigger_re = re.compile(r'.*?((?:\bbegin\b|\{)|(?:\bend\b|}))([^$]*)')
trigger_re = re.compile(r'.*?((?:\bbegin\b|\{|\bcase\b)|(?:\bend\b|}|\bendcase\b))([^$]*)')
rtl_indented = []
@ -145,7 +145,7 @@ class Component():
matchObj = trigger_re.match(line_split)
if matchObj:
if matchObj.group(1) in ('begin', '{'):
if matchObj.group(1) in ('begin', '{', 'case'):
indent_lvl_next += 1
else:
indent_lvl = indent_lvl_next - 1