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

Unified Diff: tools/grit/grit/format/html_inline.py

Issue 2615953002: Fix grit's <if> not to strip trailing or preceding whitespace (Closed)
Patch Set: indent tweak and comment fixes for thakis@ Created 3 years, 11 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 | tools/grit/grit/format/html_inline_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/format/html_inline.py
diff --git a/tools/grit/grit/format/html_inline.py b/tools/grit/grit/format/html_inline.py
index e8cf22d1e45b20aff35592cdb21b956da140bd7a..9e5ec6a81e436e145d9d42a9be6baedc2fb38518 100755
--- a/tools/grit/grit/format/html_inline.py
+++ b/tools/grit/grit/format/html_inline.py
@@ -32,12 +32,12 @@ DIST_DEFAULT = 'chromium'
DIST_ENV_VAR = 'CHROMIUM_BUILD'
DIST_SUBSTR = '%DISTRIBUTION%'
-# Matches beginning of an "if" block with trailing spaces.
+# Matches beginning of an "if" block.
_BEGIN_IF_BLOCK = lazy_re.compile(
- '<if [^>]*?expr=("(?P<expr1>[^">]*)"|\'(?P<expr2>[^\'>]*)\')[^>]*?>\s*')
+ '<if [^>]*?expr=("(?P<expr1>[^">]*)"|\'(?P<expr2>[^\'>]*)\')[^>]*?>')
-# Matches ending of an "if" block with preceding spaces.
-_END_IF_BLOCK = lazy_re.compile('\s*</if>')
+# Matches ending of an "if" block.
+_END_IF_BLOCK = lazy_re.compile('</if>')
# Used by DoInline to replace various links with inline content.
_STYLESHEET_RE = lazy_re.compile(
« no previous file with comments | « no previous file | tools/grit/grit/format/html_inline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698