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

Unified Diff: chrome/browser/resources/web_dev_style/css_checker.py

Issue 9802002: [WebUI] Fix multiple rule regex. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | « chrome/browser/resources/test_presubmit.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/web_dev_style/css_checker.py
diff --git a/chrome/browser/resources/web_dev_style/css_checker.py b/chrome/browser/resources/web_dev_style/css_checker.py
index 63bba9c4a4a08c2b3cf673bed558f341b83ba5f6..33aea5fffb428d9280c784d4a8259b9f56cddb7c 100644
--- a/chrome/browser/resources/web_dev_style/css_checker.py
+++ b/chrome/browser/resources/web_dev_style/css_checker.py
@@ -72,7 +72,7 @@ class CSSChecker(object):
return (line.find('}') >= 0 and re.search(r'[^ }]', line))
def colons_have_space_after(line):
- return re.search(r':(?!\/\/)\S(?!.*[{,]\s*$)', line)
+ return re.search(r':(?!//)\S[^;]+;\s*', line)
def favor_single_quotes(line):
return line.find('"') >= 0
@@ -89,7 +89,7 @@ class CSSChecker(object):
return re.search(small_seconds, line)
def one_rule_per_line(line):
- return re.search('(.*:(?!\/\/)){2,}(?!.*[,{]\s*$)', line)
+ return re.search(r'[_a-zA-Z0-9-]:(?!//)[^;]+;\s*[^ }]\s*', line)
any_reg = re.compile(r':(?:-webkit-)?any\(.*?\)', re.DOTALL)
multi_sels = re.compile(r'(?:}[\n\s]*)?([^,]+,(?=[^{}]+?{).*[,{])\s*$',
« no previous file with comments | « chrome/browser/resources/test_presubmit.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698