mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-10 12:46:39 +00:00
Improve compatibility with JS modules
If a module ended with a single line comment `\\` then the appended `;})();` was being ignored and eaten up as part of the comment.
This commit is contained in:
parent
4134392841
commit
a614c0d543
@ -413,7 +413,7 @@ $tw.utils.evalGlobal = function(code,context,filename) {
|
||||
contextValues.push(value);
|
||||
});
|
||||
// Add the code prologue and epilogue
|
||||
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + ";})();\nreturn exports;\n})\n";
|
||||
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + "\n;})();\nreturn exports;\n})\n";
|
||||
// Compile the code into a function
|
||||
var fn;
|
||||
if($tw.browser) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user