Alphabetically sort tiddlers

TiddlyWiki does this to make life easier for SCC systems
This commit is contained in:
Jeremy Ruston 2011-12-03 12:01:43 +00:00
parent cfa448f712
commit b07d518425
1 changed files with 7 additions and 0 deletions

View File

@ -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;