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

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

Issue 772203003: Fix presubmit @2x recognized as @at-keyword. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tbreisacher@ nit Created 6 years 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/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/web_dev_style/css_checker.py
diff --git a/chrome/browser/web_dev_style/css_checker.py b/chrome/browser/web_dev_style/css_checker.py
index d626e6098d5cfd7529c70f036ab2a184b959fcbd..494888b0d5a78cb09800fe1b68152647eaea854a 100644
--- a/chrome/browser/web_dev_style/css_checker.py
+++ b/chrome/browser/web_dev_style/css_checker.py
@@ -33,9 +33,9 @@ class CSSChecker(object):
def _remove_ats(s):
at_reg = re.compile(r"""
- @\w+[^'"]*?{ # @at-keyword selector junk {
- (.*{.*?})+ # inner { curly } blocks, rules, and selector junk
- .*?} # stuff up to the first end curly }""",
+ @(?!\d+x\b)\w+[^'"]*?{ # @at-keyword selector junk {, not @2x
+ (.*{.*?})+ # inner { curly } blocks, rules, and selector
+ .*?} # stuff up to the first end curly }""",
re.DOTALL | re.VERBOSE)
return at_reg.sub('\\1', s)
« no previous file with comments | « chrome/browser/test_presubmit.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698