Skip to content

Commit

Permalink
fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jun 5, 2022
1 parent a890464 commit 4ec2d0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/index.html
Expand Up @@ -644,7 +644,7 @@ <h1>Gaiman Programming Langauge and Text Advanture Game Engine</h1>
const zip = new JSZip();
const game = zip.folder("gaiman");
game.file("index.js", state.output_full);
game.file("index.html", state.html);
game.file("index.html", get_html('index.js'));
zip.generateAsync({ type:"blob" }).then(function(content) {
download(content, "gaiman.zip");
});
Expand Down Expand Up @@ -881,11 +881,11 @@ <h1>Gaiman Programming Langauge and Text Advanture Game Engine</h1>
state.html = get_html();
}

function get_html() {
function get_html(js_file_name = './_gaiman_output.js') {
return template(tempate_html, {
STYLE: css_sanitize(state.css),
HTML: state.user_html + '\n',
FILE: './_gaiman_output.js'
FILE: js_file_name
});
}

Expand Down

0 comments on commit 4ec2d0e

Please sign in to comment.