From b07d518425cee4787afaeacd81207dbabbba2923 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 3 Dec 2011 12:01:43 +0000 Subject: [PATCH] Alphabetically sort tiddlers TiddlyWiki does this to make life easier for SCC systems --- js/Recipe.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/Recipe.js b/js/Recipe.js index 16b78e7f0..f981de028 100755 --- a/js/Recipe.js +++ b/js/Recipe.js @@ -93,6 +93,7 @@ var Recipe = function(store,filepath,callback) { }; this.tiddlerQueue.drain = function() { me.chooseTiddlers(me.recipe); + me.sortTiddlersForMarker("tiddler"); me.callback(); }; this.recipeQueue.push({filepath: filepath, @@ -140,6 +141,12 @@ Recipe.prototype.chooseTiddlers = function(recipe) { } }; +Recipe.prototype.sortTiddlersForMarker = function(marker) { + if(this.markers[marker]) { + this.markers[marker].sort(); + } +}; + // Process the contents of a recipe file Recipe.prototype.processRecipeFile = function(recipe,text,contextPath) { var me = this;