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, |