|
|
@ -66,12 +66,16 @@ def clean_lines(orig_lines) -> list:
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if line.startswith("#"):
|
|
|
|
if line.startswith("#"):
|
|
|
|
cleaned_lines.append(strip_variable_template_tags(line))
|
|
|
|
cleaned_lines.append(strip_variable_template_tags(line))
|
|
|
|
elif line.startswith("rewrite"):
|
|
|
|
else:
|
|
|
|
|
|
|
|
if line.count(";") > 1:
|
|
|
|
|
|
|
|
newlines = line.split(";")
|
|
|
|
|
|
|
|
cleaned_lines.extend(clean_lines(["".join([ln, ";"]) for ln in newlines if ln != ""]))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if line.startswith("rewrite"):
|
|
|
|
cleaned_lines.append(strip_variable_template_tags(line))
|
|
|
|
cleaned_lines.append(strip_variable_template_tags(line))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
cleaned_lines.extend(
|
|
|
|
cleaned_lines.extend(
|
|
|
|
[strip_variable_template_tags(l).strip() for l in re.split(r"([{}])", line) if l != ""])
|
|
|
|
[strip_variable_template_tags(l).strip() for l in re.split(r"([{}])", line) if l != ""])
|
|
|
|
|
|
|
|
|
|
|
|
return cleaned_lines
|
|
|
|
return cleaned_lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|