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

Unified Diff: grit/format/html_inline.py

Issue 18568003: Fix LINK and INCLUDE HTML inlining Regexes to Support End Tags on Different Lines (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | grit/format/html_inline_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/html_inline.py
diff --git a/grit/format/html_inline.py b/grit/format/html_inline.py
index b5e0b0fbb65c6060e15dc0db94c6c87bce130180..589e49b6a94f93a8c9b81c973338643b8803272e 100755
--- a/grit/format/html_inline.py
+++ b/grit/format/html_inline.py
@@ -32,11 +32,11 @@ _END_IF_BLOCK = lazy_re.compile('\s*</if>')
# Used by DoInline to replace various links with inline content.
_STYLESHEET_RE = lazy_re.compile(
- '<link rel="stylesheet"[^>]+?href="(?P<filename>[^"]*)".*?>',
- re.MULTILINE)
+ '<link rel="stylesheet"[^>]+?href="(?P<filename>[^"]*)".*?>(\s*</link>)?',
+ re.DOTALL)
_INCLUDE_RE = lazy_re.compile(
- '<include[^>]+?src="(?P<filename>[^"\']*)".*>',
- re.MULTILINE)
+ '<include[^>]+?src="(?P<filename>[^"\']*)".*?>(\s*</include>)?',
+ re.DOTALL)
_SRC_RE = lazy_re.compile(
r'<(?!script)(?:[^>]+?\s)src=(?P<quote>")(?P<filename>[^"\']*)\1',
re.MULTILINE)
« no previous file with comments | « no previous file | grit/format/html_inline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698