diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-07 11:23:31 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-07 11:23:31 -0700 |
commit | 050fd5e05b381728759ae7b4b0480bf3432836c6 (patch) | |
tree | dba801381805f29be34074c712d352b5fb43e3bd /tools/reproduceriter.py | |
parent | 25c6c44caf7c1158e84a5e8ad1bf6b8bb78d5b61 (diff) |
fix reproduceriter regexping
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-x | tools/reproduceriter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index 270a9594..610e5c24 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -113,8 +113,8 @@ for parent, dirs, files in os.walk(out_dir): print ' ', fullname js = open(fullname).read() js = re.sub('document\.on(\w+) = ([\w.]+);', lambda m: 'Recorder.onEvent("' + m.group(1) + '", ' + m.group(2) + ');', js) - js = re.sub("([\w'\[\]]+)\.addEventListener\(([\w,. ]+)\);", lambda m: 'Recorder.addListener(' + m.group(1) + ',' + m.group(2) + ');', js) - open(filename, 'w').write(js) + js = re.sub('''([\w'"\[\]]+)\.addEventListener\(([\w,. ]+)\);''', lambda m: 'Recorder.addListener(' + m.group(1) + ', ' + m.group(2) + ');', js) + open(fullname, 'w').write(js) # Add our boilerplate |