##// END OF EJS Templates
ignore: refactor syntax concatenation...
Durham Goode -
r25066:e91b32d3 default
parent child Browse files
Show More
@@ -40,15 +40,18 b' def ignorepats(lines):'
40 except KeyError:
40 except KeyError:
41 warnings.append(_("ignoring invalid syntax '%s'") % s)
41 warnings.append(_("ignoring invalid syntax '%s'") % s)
42 continue
42 continue
43 pat = syntax + line
43
44 linesyntax = syntax
44 for s, rels in syntaxes.iteritems():
45 for s, rels in syntaxes.iteritems():
45 if line.startswith(rels):
46 if line.startswith(rels):
46 pat = line
47 linesyntax = rels
48 line = line[len(rels):]
47 break
49 break
48 elif line.startswith(s+':'):
50 elif line.startswith(s+':'):
49 pat = rels + line[len(s) + 1:]
51 linesyntax = rels
52 line = line[len(s) + 1:]
50 break
53 break
51 patterns.append(pat)
54 patterns.append(linesyntax + line)
52
55
53 return patterns, warnings
56 return patterns, warnings
54
57
General Comments 0
You need to be logged in to leave comments. Login now