aboutsummaryrefslogtreecommitdiff
path: root/compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'compile.py')
-rw-r--r--compile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/compile.py b/compile.py
index 4d2dbe2..1ab3328 100644
--- a/compile.py
+++ b/compile.py
@@ -13,7 +13,7 @@ f.close()
13 13
14# Script tags 14# Script tags
15 15
16scriptsFinder = re.compile("""<script src="/(.*)"></script>""") 16scriptsFinder = re.compile("""<script src="(.*)"></script>""")
17scripts = scriptsFinder.findall(page) 17scripts = scriptsFinder.findall(page)
18 18
19for script in scripts: 19for script in scripts:
@@ -21,13 +21,13 @@ for script in scripts:
21 s = open(filename) 21 s = open(filename)
22 scriptContent = "<script>%s</script>" % s.read() 22 scriptContent = "<script>%s</script>" % s.read()
23 s.close() 23 s.close()
24 scriptTag = """<script src="/%s"></script>""" % script 24 scriptTag = """<script src="%s"></script>""" % script
25 page = page.replace(scriptTag, scriptContent) 25 page = page.replace(scriptTag, scriptContent)
26 26
27 27
28# Style tags 28# Style tags
29 29
30stylesFinder = re.compile("""<link rel="stylesheet" href="/(.*)">""") 30stylesFinder = re.compile("""<link rel="stylesheet" href="(.*)">""")
31styles = stylesFinder.findall(page) 31styles = stylesFinder.findall(page)
32 32
33for style in styles: 33for style in styles:
@@ -35,7 +35,7 @@ for style in styles:
35 s = open(filename) 35 s = open(filename)
36 styleContent = "<style>%s</style>" % s.read() 36 styleContent = "<style>%s</style>" % s.read()
37 s.close() 37 s.close()
38 styleTag = """<link rel="stylesheet" href="/%s">""" % style 38 styleTag = """<link rel="stylesheet" href="%s">""" % style
39 page = page.replace(styleTag, styleContent) 39 page = page.replace(styleTag, styleContent)
40 40
41 41