Closed increpare closed 2 years ago
explain this to yourself better (in buildstandalone.js) " // $ has special meaning to JavaScript's String.replace ($0, $1, etc.) Escape $ as $$. sourceCode = sourceCode.replace(/\$/g, '$$$$');
htmlString = htmlString.replace(/__GAMEDAT__/g,sourceCode);
"
explanation added in https://github.com/increpare/PuzzleScript/commit/a7cd1534a90bc0288c58c2baaf1d720c7167572b
explain this to yourself better (in buildstandalone.js) " // $ has special meaning to JavaScript's String.replace ($0, $1, etc.) Escape $ as $$. sourceCode = sourceCode.replace(/\$/g, '$$$$');
"