diff --git a/2bld.sh b/2bld.sh index d95a7d5a9..84d1aeb6b 100755 --- a/2bld.sh +++ b/2bld.sh @@ -11,7 +11,7 @@ mkdir -p tmp/tw2 node ./tiddlywiki.js \ editions/tw5.com \ --verbose \ - --new_rendertiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \ + --rendertiddler TiddlyWiki2ReadMe editions/tw2/readme.md text/html \ || exit 1 # cook the TiddlyWiki 2.x.x index file @@ -20,7 +20,7 @@ node ./tiddlywiki.js \ editions/tw2 \ --verbose \ --load editions/tw2/source/tiddlywiki.com/index.html.recipe \ - --new_rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \ || exit 1 diff -q tmp/tw2/index.html editions/tw2/target/prebuilt.html diff --git a/bld.sh b/bld.sh index 6dce60d91..fb3333a0f 100755 --- a/bld.sh +++ b/bld.sh @@ -35,12 +35,12 @@ rm $TW5_BUILD_OUTPUT/static/* node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ - --new_rendertiddler ReadMe ./readme.md text/html \ - --new_rendertiddler ContributingTemplate ./contributing.md text/html \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \ - --new_rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ - --new_rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \ - --new_rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \ + --rendertiddler ReadMe ./readme.md text/html \ + --rendertiddler ContributingTemplate ./contributing.md text/html \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \ + --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ + --rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \ + --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \ || exit 1 # Second, encrypted.html: a version of the main file encrypted with the password "password" @@ -49,7 +49,7 @@ node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ --password password \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/encrypted.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/encrypted.html text/plain \ || exit 1 # Third, empty.html: empty wiki for reuse @@ -57,7 +57,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/empty \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/empty.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/empty.html text/plain \ || exit 1 # Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS @@ -65,7 +65,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/tahoelafs \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ || exit 1 # Fifth, d3demo.html: wiki to demo d3 plugin @@ -73,7 +73,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/d3demo \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/d3demo.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/d3demo.html text/plain \ || exit 1 # Sixth, codemirrordemo.html: wiki to demo codemirror plugin @@ -81,7 +81,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/codemirrordemo \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ || exit 1 # Seventh, codemirrordemo.html: wiki to demo codemirror plugin @@ -89,7 +89,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/markdowndemo \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ || exit 1 # Eighth, run the test edition to run the node.js tests and to generate test.html for tests in the browser diff --git a/core/modules/commands/new_rendertiddler.js b/core/modules/commands/new_rendertiddler.js index 41dc5d66d..b63d9855d 100755 --- a/core/modules/commands/new_rendertiddler.js +++ b/core/modules/commands/new_rendertiddler.js @@ -1,5 +1,5 @@ /*\ -title: $:/core/modules/commands/new_rendertiddler.js +title: $:/core/modules/commands/rendertiddler.js type: application/javascript module-type: command @@ -13,7 +13,7 @@ Command to render a tiddler and save it to a file "use strict"; exports.info = { - name: "new_rendertiddler", + name: "rendertiddler", synchronous: false }; @@ -33,7 +33,7 @@ Command.prototype.execute = function() { title = this.params[0], filename = this.params[1], type = this.params[2] || "text/html"; - fs.writeFile(filename,this.commander.wiki.new_renderTiddler(type,title),"utf8",function(err) { + fs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),"utf8",function(err) { self.callback(err); }); return null; diff --git a/core/modules/commands/new_rendertiddlers.js b/core/modules/commands/new_rendertiddlers.js index 6aa430f66..20a1d5214 100644 --- a/core/modules/commands/new_rendertiddlers.js +++ b/core/modules/commands/new_rendertiddlers.js @@ -1,5 +1,5 @@ /*\ -title: $:/core/modules/commands/new_rendertiddlers.js +title: $:/core/modules/commands/rendertiddlers.js type: application/javascript module-type: command @@ -15,7 +15,7 @@ Command to render several tiddlers to a folder of files var widget = require("$:/core/modules/widgets/widget.js"); exports.info = { - name: "new_rendertiddlers", + name: "rendertiddlers", synchronous: true }; @@ -40,7 +40,7 @@ Command.prototype.execute = function() { extension = this.params[4] || ".html", tiddlers = wiki.filterTiddlers(filter); $tw.utils.each(tiddlers,function(title) { - var parser = wiki.new_parseTiddler(template), + var parser = wiki.parseTiddler(template), widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}}); var container = $tw.document.createElement("div"); widgetNode.render(container,null); diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index b71db0533..78e3f5962 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -147,7 +147,7 @@ var Command = function(params,commander,callback) { path: /^\/$/, handler: function(request,response,state) { response.writeHead(200, {"Content-Type": state.server.get("serveType")}); - var text = state.wiki.new_renderTiddler(state.server.get("renderType"),state.server.get("rootTiddler")); + var text = state.wiki.renderTiddler(state.server.get("renderType"),state.server.get("rootTiddler")); response.end(text,"utf8"); } }); diff --git a/core/modules/parsers/wikiparser/rules/typedblock.js b/core/modules/parsers/wikiparser/rules/typedblock.js index 079e44a5d..5564d49a9 100644 --- a/core/modules/parsers/wikiparser/rules/typedblock.js +++ b/core/modules/parsers/wikiparser/rules/typedblock.js @@ -59,7 +59,7 @@ exports.parse = function() { this.parser.pos = this.parser.sourceLength; } // Parse the block according to the specified type - var parser = this.parser.wiki.new_parseText(parseType,text,{defaultType: "text/plain"}); + var parser = this.parser.wiki.parseText(parseType,text,{defaultType: "text/plain"}); // If there's no render type, just return the parse tree if(!renderType) { return parser.tree; diff --git a/core/modules/startup.js b/core/modules/startup.js index dee5de7a3..a9bed67fc 100755 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -106,7 +106,7 @@ exports.startup = function() { }); // Display the PageMacros, which includes the PageTemplate var templateTitle = "$:/core/ui/PageMacros", - parser = $tw.wiki.new_parseTiddler(templateTitle); + parser = $tw.wiki.parseTiddler(templateTitle); $tw.pageWidgetNode = $tw.wiki.makeWidget(parser,{document: document, parentWidget: $tw.rootWidget}); $tw.pageContainer = document.createElement("div"); $tw.utils.addClass($tw.pageContainer,"tw-page-container"); diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 357d652a0..f2e2c1d45 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -73,14 +73,14 @@ Modal.prototype.display = function(title,options) { } else { titleText = title; } - var headerParser = this.wiki.new_parseText("text/vnd.tiddlywiki",titleText,{parseAsInline: true}), + var headerParser = this.wiki.parseText("text/vnd.tiddlywiki",titleText,{parseAsInline: true}), headerWidgetNode = this.wiki.makeWidget(headerParser,{parentWidget: $tw.rootWidget, document: document}); headerWidgetNode.render(headerTitle,null); this.wiki.addEventListener("change",function(changes) { headerWidgetNode.refresh(changes,modalHeader,null); }); // Render the body of the message - var bodyParser = this.wiki.new_parseTiddler(title), + var bodyParser = this.wiki.parseTiddler(title), bodyWidgetNode = this.wiki.makeWidget(bodyParser,{parentWidget: $tw.rootWidget, document: document}); bodyWidgetNode.render(modalBody,null); this.wiki.addEventListener("change",function(changes) { @@ -107,7 +107,7 @@ Modal.prototype.display = function(title,options) { } else { footerText = '<$button message="tw-close-tiddler" class="btn btn-primary">Close'; } - var footerParser = this.wiki.new_parseText("text/vnd.tiddlywiki",footerText,{parseAsInline: true}), + var footerParser = this.wiki.parseText("text/vnd.tiddlywiki",footerText,{parseAsInline: true}), footerWidgetNode = this.wiki.makeWidget(footerParser,{parentWidget: $tw.rootWidget, document: document}); footerWidgetNode.render(modalFooterButtons,null); this.wiki.addEventListener("change",function(changes) { diff --git a/core/modules/utils/dom/notifier.js b/core/modules/utils/dom/notifier.js index 02e5d7493..e20db5089 100644 --- a/core/modules/utils/dom/notifier.js +++ b/core/modules/utils/dom/notifier.js @@ -37,7 +37,7 @@ Notifier.prototype.display = function(title,options) { // Add classes $tw.utils.addClass(notification,"tw-notification"); // Render the body of the notification - var parser = this.wiki.new_parseTiddler(title), + var parser = this.wiki.parseTiddler(title), widgetNode = this.wiki.makeWidget(parser,{parentWidget: $tw.rootWidget, document: document}); widgetNode.render(notification,null); this.wiki.addEventListener("change",function(changes) { diff --git a/core/modules/utils/dom/styles.js b/core/modules/utils/dom/styles.js index 0f29a77db..648e4c3d4 100644 --- a/core/modules/utils/dom/styles.js +++ b/core/modules/utils/dom/styles.js @@ -34,7 +34,7 @@ StylesheetManager.prototype.addStylesheet = function(title) { // Record the stylesheet in the hashmap this.stylesheets[title] = true; // Parse the tiddler and render as plain text - var text = this.wiki.new_renderTiddler("text/plain",title); + var text = this.wiki.renderTiddler("text/plain",title); // Create a style element and put it in the document var styleNode = document.createElement("style"); styleNode.setAttribute("type","text/css"); diff --git a/core/modules/widgets/list.js b/core/modules/widgets/list.js index e40d3fb7f..eef444109 100755 --- a/core/modules/widgets/list.js +++ b/core/modules/widgets/list.js @@ -81,7 +81,7 @@ ListWidget.prototype.getTiddlerList = function() { ListWidget.prototype.getEmptyMessage = function() { var emptyMessage = this.getAttribute("emptyMessage",""), - parser = this.wiki.new_parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true}); + parser = this.wiki.parseText("text/vnd.tiddlywiki",emptyMessage,{parseAsInline: true}); if(parser) { return parser.tree; } else { diff --git a/core/modules/widgets/macrocall.js b/core/modules/widgets/macrocall.js index 0b8ea4766..02bc8cce5 100644 --- a/core/modules/widgets/macrocall.js +++ b/core/modules/widgets/macrocall.js @@ -53,12 +53,12 @@ MacroCallWidget.prototype.execute = function() { // Are we rendering to HTML? if(this.renderOutput === "text/html") { // If so we'll return the parsed macro - var parser = this.wiki.new_parseText(this.parseType,text, + var parser = this.wiki.parseText(this.parseType,text, {parseAsInline: !this.parseTreeNode.isBlock}); parseTreeNodes = parser ? parser.tree : []; } else { // Otherwise, we'll render the text - var plainText = this.wiki.new_renderText("text/plain",this.parseType,text,{parentWidget: this}); + var plainText = this.wiki.renderText("text/plain",this.parseType,text,{parentWidget: this}); parseTreeNodes = [{type: "text", text: plainText}]; } // Construct the child widgets diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index de07f7655..18d43af26 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -50,7 +50,7 @@ TranscludeWidget.prototype.execute = function() { // Set context variables for recursion detection this.setVariable("transclusion",recursionMarker); // Parse the text reference - var parser = this.wiki.new_parseTextReference( + var parser = this.wiki.parseTextReference( this.transcludeTitle, this.transcludeField, this.transcludeIndex, diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index 85eda10b3..db6f4a2a7 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -121,7 +121,7 @@ ViewWidget.prototype.getValueAsText = function() { }; ViewWidget.prototype.getValueAsHtmlWikified = function() { - return this.wiki.new_renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),this); + return this.wiki.renderText("text/html","text/vnd.tiddlywiki",this.getValueAsText(),this); }; ViewWidget.prototype.getValueAsHtmlEncoded = function() { diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 897f5f6c5..bc2159716 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -218,7 +218,7 @@ Widget.prototype.computeAttributes = function() { value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler")); } else if(attribute.type === "macro") { var text = self.getVariable(attribute.value.name,{params: attribute.value.params}); - value = self.wiki.new_renderText("text/plain","text/vnd.tiddlywiki",text); + value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text); } else { // String attribute value = attribute.value; } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index a70fc67e7..4d8d0e2d7 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -329,7 +329,7 @@ exports.getTiddlerLinks = function(title) { // We'll cache the links so they only get computed if the tiddler changes return this.getCacheForTiddler(title,"links",function() { // Parse the tiddler - var parser = self.new_parseTiddler(title); + var parser = self.parseTiddler(title); // Count up the links var links = [], checkParseTree = function(parseTree) { @@ -672,7 +672,7 @@ var tweakParser = function(parser) { tweakParseTreeNodes(parser.tree); }; -exports.new_parseText = function(type,text,options) { +exports.parseText = function(type,text,options) { var parser = this.old_parseText(type,text,options); if(parser) { tweakParser(parser) @@ -680,7 +680,7 @@ exports.new_parseText = function(type,text,options) { return parser; }; -exports.new_parseTiddler = function(title,options) { +exports.parseTiddler = function(title,options) { var parser = this.old_parseTiddler(title,options); if(parser) { tweakParser(parser) @@ -688,9 +688,9 @@ exports.new_parseTiddler = function(title,options) { return parser; }; -exports.new_parseTextReference = function(title,field,index,options) { +exports.parseTextReference = function(title,field,index,options) { if(field === "text" || (!field && !index)) { - return this.new_parseTiddler(title,options); + return this.parseTiddler(title,options); } else { var tiddler,text; if(field) { @@ -699,10 +699,10 @@ exports.new_parseTextReference = function(title,field,index,options) { if(text === undefined) { text = ""; } - return this.new_parseText("text/vnd.tiddlywiki",text,options); + return this.parseText("text/vnd.tiddlywiki",text,options); } else if(index) { text = this.extractTiddlerDataItem(title,index,""); - return this.new_parseText("text/vnd.tiddlywiki",text,options); + return this.parseText("text/vnd.tiddlywiki",text,options); } } }; @@ -756,9 +756,9 @@ Options include: variables: hashmap of variables to set parentWidget: optional parent widget for the root node */ -exports.new_renderText = function(outputType,textType,text,options) { +exports.renderText = function(outputType,textType,text,options) { options = options || {}; - var parser = $tw.wiki.new_parseText(textType,text), + var parser = $tw.wiki.parseText(textType,text), widgetNode = this.makeWidget(parser,options); var container = $tw.document.createElement("div"); widgetNode.render(container,null); @@ -774,9 +774,9 @@ Options include: variables: hashmap of variables to set parentWidget: optional parent widget for the root node */ -exports.new_renderTiddler = function(outputType,title,options) { +exports.renderTiddler = function(outputType,title,options) { options = options || {}; - var parser = this.new_parseTiddler(title), + var parser = this.parseTiddler(title), widgetNode = this.makeWidget(parser,options); var container = $tw.document.createElement("div"); widgetNode.render(container,null); @@ -832,7 +832,7 @@ exports.saveWiki = function(options) { options = options || {}; var template = options.template || "$:/core/templates/tiddlywiki5.template.html", downloadType = options.downloadType || "text/plain"; - var text = this.new_renderTiddler(downloadType,template); + var text = this.renderTiddler(downloadType,template); this.callSaver("save",text,function(err) { $tw.notifier.display("$:/messages/Saved"); }); diff --git a/editions/test/tiddlers/tests/test-widget.js b/editions/test/tiddlers/tests/test-widget.js index 39a1496b6..d65efb3bf 100755 --- a/editions/test/tiddlers/tests/test-widget.js +++ b/editions/test/tiddlers/tests/test-widget.js @@ -25,7 +25,7 @@ describe("Widget module", function() { } function parseText(text,wiki,options) { - var parser = wiki.new_parseText("text/vnd.tiddlywiki",text,options); + var parser = wiki.parseText("text/vnd.tiddlywiki",text,options); return parser ? {type: "widget", children: parser.tree} : undefined; } diff --git a/editions/test/tiddlers/tests/test-wikitext-parser.js b/editions/test/tiddlers/tests/test-wikitext-parser.js index 8452dfaa6..7eeee6a57 100644 --- a/editions/test/tiddlers/tests/test-wikitext-parser.js +++ b/editions/test/tiddlers/tests/test-wikitext-parser.js @@ -19,7 +19,7 @@ describe("WikiText parser tests", function() { // Define a parsing shortcut var parse = function(text) { - return wiki.new_parseText("text/vnd.tiddlywiki",text).tree; + return wiki.parseText("text/vnd.tiddlywiki",text).tree; }; it("should parse tags", function() { diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index dd836a61a..d4bbac436 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -23,27 +23,27 @@ describe("WikiText tests", function() { wiki.addTiddler({title: "TiddlerFour", text: "\\define my-macro(adjective:'groovy')\nThis is my ''amazingly'' $adjective$ macro!\n\\end\n\n<$link to=<>>This is a link"}); it("should render tiddlers with no special markup as-is", function() { - expect(wiki.new_renderTiddler("text/plain","TiddlerOne")).toBe("The quick brown fox"); + expect(wiki.renderTiddler("text/plain","TiddlerOne")).toBe("The quick brown fox"); }); it("should preserve single new lines", function() { - expect(wiki.new_renderTiddler("text/plain","TiddlerTwo")).toBe("The rain in Spain\nfalls mainly on the plain"); + expect(wiki.renderTiddler("text/plain","TiddlerTwo")).toBe("The rain in Spain\nfalls mainly on the plain"); }); it("should use double new lines to create paragraphs", function() { // The paragraphs are lost in the conversion to plain text - expect(wiki.new_renderTiddler("text/plain","TiddlerThree")).toBe("The speed of soundThe light of speed"); + expect(wiki.renderTiddler("text/plain","TiddlerThree")).toBe("The speed of soundThe light of speed"); }); it("should render plain text tiddlers as a paragraph", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerOne")).toBe("

The quick brown fox

"); + expect(wiki.renderTiddler("text/html","TiddlerOne")).toBe("

The quick brown fox

"); }); it("should preserve single new lines", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerTwo")).toBe("

The rain in Spain\nfalls mainly on the plain

"); + expect(wiki.renderTiddler("text/html","TiddlerTwo")).toBe("

The rain in Spain\nfalls mainly on the plain

"); }); it("should use double new lines to create paragraphs", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerThree")).toBe("

The speed of sound

The light of speed

"); + expect(wiki.renderTiddler("text/html","TiddlerThree")).toBe("

The speed of sound

The light of speed

"); }); it("should support attributes specified as macro invocations", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerFour")).toBe("

This is a link

"); + expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("

This is a link

"); }); }); diff --git a/ginsu.sh b/ginsu.sh index fa866660d..b83c7913a 100755 --- a/ginsu.sh +++ b/ginsu.sh @@ -9,6 +9,6 @@ node ./tiddlywiki.js \ ./editions/empty \ --verbose \ --load $1 \ - --new_rendertiddler $:/core/templates/split-recipe tmp/ginsu/split.recipe text/plain \ - --new_rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp/ginsu text/plain .tid \ + --rendertiddler $:/core/templates/split-recipe tmp/ginsu/split.recipe text/plain \ + --rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp/ginsu text/plain .tid \ || exit 1 diff --git a/plugins/tiddlywiki/filesystem/filesystemadaptor.js b/plugins/tiddlywiki/filesystem/filesystemadaptor.js index 82fd4053b..4b370c868 100644 --- a/plugins/tiddlywiki/filesystem/filesystemadaptor.js +++ b/plugins/tiddlywiki/filesystem/filesystemadaptor.js @@ -152,7 +152,7 @@ FileSystemAdaptor.prototype.saveTiddler = function(tiddler,callback) { if(err) { return callback(err); } - content = $tw.wiki.new_renderTiddler("text/plain","$:/core/templates/tiddler-metadata",{variables: {currentTiddler: tiddler.fields.title}}); + content = $tw.wiki.renderTiddler("text/plain","$:/core/templates/tiddler-metadata",{variables: {currentTiddler: tiddler.fields.title}}); fs.writeFile(fileInfo.filepath + ".meta",content,{encoding: "utf8"},function (err) { if(err) { return callback(err); @@ -164,7 +164,7 @@ console.log("FileSystem: Saved file",fileInfo.filepath); } else { // Save the tiddler as a self contained templated file template = $tw.config.typeTemplates[fileInfo.type]; - content = $tw.wiki.new_renderTiddler("text/plain",template,{variables: {currentTiddler: tiddler.fields.title}}); + content = $tw.wiki.renderTiddler("text/plain",template,{variables: {currentTiddler: tiddler.fields.title}}); fs.writeFile(fileInfo.filepath,content,{encoding: "utf8"},function (err) { if(err) { return callback(err); diff --git a/test.sh b/test.sh index f31176b57..6ebacafe7 100755 --- a/test.sh +++ b/test.sh @@ -20,5 +20,5 @@ echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" node ./tiddlywiki.js \ ./editions/test \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \ || exit 1 diff --git a/wbld.sh b/wbld.sh index b6bc5ceaf..9d685fa16 100755 --- a/wbld.sh +++ b/wbld.sh @@ -15,7 +15,7 @@ mkdir -p tmp node ./tiddlywiki.js \ editions/tw5tiddlyweb \ --verbose \ - --new_rendertiddler $:/core/templates/tiddlywiki5.template.html tmp/tiddlyweb.html text/plain \ + --rendertiddler $:/core/templates/tiddlywiki5.template.html tmp/tiddlyweb.html text/plain \ || exit 1 # Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file