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

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

Issue 2835009: Split options page code/html into its own set of files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/browser/resources/options/preferences.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/format/html_inline.py
===================================================================
--- tools/grit/grit/format/html_inline.py (revision 51178)
+++ tools/grit/grit/format/html_inline.py (working copy)
@@ -107,6 +107,10 @@
return src_match.group(0)
return pattern % ReadFile(filepath)
+ def InlineIncludeFiles(src_match):
+ """Helper function to inline external script files"""
+ return InlineFileContents(src_match, '%s')
+
def InlineScript(src_match):
"""Helper function to inline external script files"""
return InlineFileContents(src_match, '<script>%s</script>')
@@ -152,6 +156,11 @@
InlineCssFile,
flat_text)
+ flat_text = re.sub(
+ '<!--\s*include\s+file="(?P<filename>[^"\']*)".*-->',
+ InlineIncludeFiles,
+ flat_text)
+
# TODO(glen): Make this regex not match src="" text that is not inside a tag
flat_text = re.sub('src="(?P<filename>[^"\']*)"',
SrcReplace,
« no previous file with comments | « chrome/browser/resources/options/preferences.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698