Chromium Code Reviews| Index: Source/build/scripts/make-file-arrays.py |
| diff --git a/Source/build/scripts/make-file-arrays.py b/Source/build/scripts/make-file-arrays.py |
| index f496d01e6f66e6255de1f178129ff988f4fb433f..6e04d49f7d46b7f58cac486b89c8065346365179 100755 |
| --- a/Source/build/scripts/make-file-arrays.py |
| +++ b/Source/build/scripts/make-file-arrays.py |
| @@ -45,7 +45,10 @@ import rjsmin |
| def make_variable_name_and_read(file_name): |
| - result = re.match(r'([\w\d_]+)\.([\w\d_]+)', os.path.basename(file_name)) |
| + base_name = os.path.basename(file_name) |
| + # view-source.css -> viewSource.css |
| + base_name = re.sub(r'-[a-zA-Z]', lambda match: match.group(0)[1:].upper(), base_name) |
| + result = re.match(r'([\w\d_]+)\.([\w\d_]+)', base_name) |
| if not result: |
| print 'Invalid input file name:', os.path.basename(file_name) |
| sys.exit(1) |
| @@ -62,8 +65,7 @@ def strip_whitespace_and_comments(file_name, content): |
| sys.exit(1) |
| extension = result.group(1).lower() |
| multi_line_comment = re.compile(r'/\*.*?\*/', re.MULTILINE | re.DOTALL) |
| - # Don't accidentally match URLs (http://...) |
|
tkent
2014/06/30 07:09:17
This is a bogus comment. leftover of http://src.c
|
| - repeating_space = re.compile(r'[ \t]+', re.MULTILINE) |
| + repeating_space = re.compile(r'\s+', re.MULTILINE) |
| leading_space = re.compile(r'^[ \t]+', re.MULTILINE) |
| trailing_space = re.compile(r'[ \t]+$', re.MULTILINE) |
|
haraken
2014/07/01 00:47:45
Shall we use [\s\t]+ for all of repeating_space, l
tkent
2014/07/01 01:05:45
Done.
|
| empty_line = re.compile(r'\n+') |