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

Unified Diff: chrome/browser/web_dev_style/html_checker.py

Issue 1256653002: Fix i18n-content HTML presubmit check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/html_checker_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_dev_style/html_checker.py
diff --git a/chrome/browser/web_dev_style/html_checker.py b/chrome/browser/web_dev_style/html_checker.py
index 78015542d4e1bb5aceec74f4c0e4422009273db0..422b7852185410a6f833185faee07bc96a269034 100644
--- a/chrome/browser/web_dev_style/html_checker.py
+++ b/chrome/browser/web_dev_style/html_checker.py
@@ -46,9 +46,9 @@ class HtmlChecker(object):
def I18nContentJavaScriptCaseCheck(self, line_number, line):
regex = self.input_api.re.compile("""
- (?:^|\s) # start of line or whitespace
- i18n-content=" # i18n-content="
- ([A-Z]|.*[_-].*") # starts with caps or contains '-' or '_'
+ (?:^|\s) # start of line or whitespace
+ i18n-content=" # i18n-content="
+ ([A-Z][^"]*|[^"]*[-_][^"]*)" # starts with caps or contains '-' or '_'
tommycli 2015/07/23 20:27:27 Hey should we do use '*?' instead of '*'? It seem
Dan Beam 2015/07/23 20:28:13 it doesn't matter. [^"] stops at quotes
tommycli 2015/07/23 20:29:38 Ah that's right.
""",
self.input_api.re.VERBOSE)
return regex_check.RegexCheck(self.input_api.re, line_number, line, regex,
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/html_checker_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698