Add transformations requested in bug #13246.
This commit is contained in:
parent
963249b101
commit
28fa71f718
1 changed files with 12 additions and 0 deletions
|
@ -1285,6 +1285,18 @@ def hack_syntax(filename, lines):
|
|||
print '"%s", line %d: quote-enclosing attribute value.'%(filename, i+1)
|
||||
except TypeError:
|
||||
pass
|
||||
# Transformation for 1.7:
|
||||
for i in range(len(lines)):
|
||||
if "no-syntax-rewrite" in lines[i]:
|
||||
break
|
||||
if lines[i].startswith("#"):
|
||||
pass
|
||||
# RC -> PAL
|
||||
elif "RC" in lines[i]:
|
||||
lines[i] = re.sub("~RC\(([^=]*)=([^)]*)\)",r"~PAL(\1>\2)",lines[i])
|
||||
elif "campaigns/" in lines[i]:
|
||||
lines[i] = lines[i].replace("{~campaigns/", "{~add-ons/")
|
||||
lines[i] = lines[i].replace("{@campaigns/", "{@add-ons/")
|
||||
# More syntax transformations would go here.
|
||||
return lines
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue