detect old header too

This commit is contained in:
Maxim.Mossienko
2012-01-24 19:18:10 +04:00
parent b7a6ac3ce8
commit b2909fb378
3 changed files with 21 additions and 1 deletions
@@ -54,6 +54,7 @@ public class FileHeaderChecker {
TIntObjectHashMap<String> offsetToProperty = new TIntObjectHashMap<String>();
String templateText = template.getText().trim();
String regex = templateToRegex(templateText, offsetToProperty);
regex = StringUtil.replace(regex, "with", "(?:with|by)");
regex = ".*("+regex+").*";
String fileText = file.getText();
Pattern pattern = Pattern.compile(regex, Pattern.DOTALL);