Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: Source/build/scripts/name_utilities.py

Issue 35423004: Move SVGNames to Python (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/build/scripts/name_utilities.py
diff --git a/Source/build/scripts/name_utilities.py b/Source/build/scripts/name_utilities.py
index 2df84622fc7f5810f78f4b32af88b53065132801..fbbb34425a5fa63be336216f3a319dcbf4d9d545 100644
--- a/Source/build/scripts/name_utilities.py
+++ b/Source/build/scripts/name_utilities.py
@@ -30,7 +30,7 @@ import os.path
import re
-ACRONYMS = ['CSS', 'HTML', 'IME', 'JS', 'SVG', 'URL', 'WOFF', 'XML', 'XSLT']
+ACRONYMS = ['CSS', 'FE', 'HTML', 'IME', 'JS', 'SVG', 'URL', 'WOFF', 'XML', 'XSLT']
def lower_first(name):
@@ -40,14 +40,14 @@ def lower_first(name):
"""
for acronym in ACRONYMS:
if name.startswith(acronym):
- return name.replace(acronym, acronym.lower())
+ return name.replace(acronym, acronym.lower(), 1)
return name[0].lower() + name[1:]
def upper_first(name):
for acronym in ACRONYMS:
if name.startswith(acronym.lower()):
- return name.replace(acronym.lower(), acronym)
+ return name.replace(acronym.lower(), acronym, 1)
return name[0].upper() + name[1:]
« no previous file with comments | « Source/build/scripts/make_qualified_names.py ('k') | Source/build/scripts/templates/ElementFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698