Skip to content

Commit e68f88c

Browse files
committed
Bug fix
1 parent e2595d8 commit e68f88c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

build.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ def read_text(path):
77

88
def inline_assets(html, css, js):
99
compilation_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
10-
page = html.replace(f'<span id="tool-version"></span>', '<span id="tool-version">compiled on {compilation_time}<strong></strong></span>')
11-
page = html.replace('<link rel="stylesheet" href="style.css">', '')
12-
page = page.replace('</head>', f'<style>\n{css}\n</style>\n</head>')
13-
page = page.replace('<script src="app.js"></script>', '')
14-
return page.replace('</body>', f'<script>\n{js}\n</script>\n</body>')
10+
html = html.replace(f'<span id="tool-version"></span>', '<span id="tool-version">compiled on {compilation_time}<strong></strong></span>')
11+
html = html.replace('<link rel="stylesheet" href="style.css">', '')
12+
html = html.replace('</head>', f'<style>\n{css}\n</style>\n</head>')
13+
html = html.replace('<script src="app.js"></script>', '')
14+
html = html.replace('</body>', f'<script>\n{js}\n</script>\n</body>')
15+
return html
1516

1617

1718
if __name__ == "__main__":

0 commit comments

Comments
 (0)