mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Renamed Main.js to App.js
Because now we're going to use the same logic for the client and server
This commit is contained in:
parent
0552da7810
commit
883956e855
@ -1,5 +1,5 @@
|
||||
/*\
|
||||
title: js/Main.js
|
||||
title: js/App.js
|
||||
|
||||
This is the main() function in the browser
|
||||
|
@ -17,7 +17,7 @@ var Sandbox = function(parserText) {
|
||||
|
||||
Sandbox.prototype.parse = function(code) {
|
||||
return this.parser.parse(code);
|
||||
}
|
||||
};
|
||||
|
||||
Sandbox.prototype.execute = function(code,globals) {
|
||||
var globalNames = [],
|
||||
|
@ -168,18 +168,14 @@ WikiStore.prototype.getFormattedTiddlerField = function(title,field,format,templ
|
||||
switch(format) {
|
||||
case "text":
|
||||
return utils.htmlEncode(tiddler.fields[field]);
|
||||
break;
|
||||
case "link":
|
||||
// xxx: Attribute encoding is wrong
|
||||
return "<a href='" + utils.htmlEncode(tiddler.fields[field]) + "'>" + utils.htmlEncode(tiddler.fields[field]) + "</a>";
|
||||
break;
|
||||
case "wikified":
|
||||
return this.renderTiddler("text/html",tiddler.fields.title);
|
||||
break;
|
||||
case "date":
|
||||
template = template || "DD MMM YYYY";
|
||||
return utils.htmlEncode(utils.formatDateString(tiddler.fields[field],template));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
@ -78,9 +78,9 @@ WikiTextCompiler.prototype.compileAsHtml = function(treenode) {
|
||||
var insertParam = function(name,arg) {
|
||||
if(arg.evaluated) {
|
||||
var prog = me.store.sandbox.parse(arg.string);
|
||||
paramsProps[m] = prog.elements[0];
|
||||
paramsProps[name] = prog.elements[0];
|
||||
} else {
|
||||
paramsProps[m] = {type: "StringLiteral", value: arg.string};
|
||||
paramsProps[name] = {type: "StringLiteral", value: arg.string};
|
||||
}
|
||||
};
|
||||
for(var m in macro.params) {
|
||||
|
@ -62,7 +62,7 @@ function executeModule(modName,modRoot) {
|
||||
|
||||
$(function() {
|
||||
// Execute the main module
|
||||
executeModule("js/Main.js");
|
||||
executeModule("js/App.js");
|
||||
})
|
||||
|
||||
})();
|
@ -22,7 +22,7 @@ jsmodule: ../js/WikiTextRenderer.js
|
||||
jsmodule: ../js/WikiTextCompiler.js
|
||||
jsmodule: ../js/Navigators.js
|
||||
jsmodule: ../js/StoryNavigator.js
|
||||
jsmodule: ../js/Main.js
|
||||
jsmodule: ../js/App.js
|
||||
|
||||
jsmodule: ../node_modules/pegjs/lib/peg.js
|
||||
title: pegjs
|
||||
|
Loading…
Reference in New Issue
Block a user