| Index: chrome/common/extensions/PRESUBMIT.py
|
| diff --git a/chrome/common/extensions/PRESUBMIT.py b/chrome/common/extensions/PRESUBMIT.py
|
| index 08ff3a5564d1c6e5d10a6626125877c9d10743ff..0f2636b24f55620c215b12abfb63a63d8a4b6039 100644
|
| --- a/chrome/common/extensions/PRESUBMIT.py
|
| +++ b/chrome/common/extensions/PRESUBMIT.py
|
| @@ -25,6 +25,8 @@ LOCAL_PUBLIC_TEMPLATES_PATH = os.path.join('docs',
|
| 'templates',
|
| 'public')
|
|
|
| +EXTENSIONS_TO_REMOVE_FOR_CLEAN_URLS = ('.md', '.html')
|
| +
|
| def _ReadFile(filename):
|
| with open(filename) as f:
|
| return f.read()
|
| @@ -48,9 +50,13 @@ def _FindMatchingTemplates(template_name, template_path_list):
|
| unix_name = _UnixName(template_name)
|
| for template in template_path_list:
|
| if unix_name == _UnixName(template.split(os.sep)[-1]):
|
| - # The docserver expects clean (extensionless) template URLs, so we strip
|
| - # extensions here when generating the list of matches.
|
| - matches.append(os.path.splitext(template)[0])
|
| + basename, ext = os.path.splitext(template)
|
| + # The docserver expects clean (extensionless) template URLs, so we
|
| + # strip some extensions here when generating the list of matches.
|
| + if ext in EXTENSIONS_TO_REMOVE_FOR_CLEAN_URLS:
|
| + matches.append(basename)
|
| + else:
|
| + matches.append(template)
|
| return matches
|
|
|
| def _SanitizeAPIName(name, api_path):
|
|
|