diff --git a/includes/script.js b/includes/script.js index 07ca460..ea92690 100644 --- a/includes/script.js +++ b/includes/script.js @@ -109,7 +109,7 @@ $(document).ready(function() { bitsyData = {}; // get palettes - var palettes = input.match(/PAL (.*)\s(NAME (.*)\s)?([0-9,]*[\s]){3}/g); + var palettes = input.match(/PAL ([^\n]*)\n(NAME ([^\n]*)\n)?(([0-9,]+){3}\n){3,}/g); bitsyData.palettes = {}; @@ -544,6 +544,8 @@ $(document).ready(function() { // write $textArea.val(newGameData); + handleBitsyGameData(); + // todo: give the user some nice "yay! it worked!" kinda feedback? }); });