diff --git a/js/TiddlerOutput.js b/js/TiddlerOutput.js index 0c317cbf8..73230360a 100755 --- a/js/TiddlerOutput.js +++ b/js/TiddlerOutput.js @@ -46,34 +46,39 @@ tiddlerOutput.outputTiddler = function(tid) { Output a tiddler as an HTML
out - array to push the output strings tid - the tiddler to be output -options - options: - omitPrecedingLineFeed - determines if a linefeed is inserted between the
 tag and the text
+The fields are in the order title, creator, modifier, created, modified, tags, followed by any others
 */
 tiddlerOutput.outputTiddlerDiv = function(tid) {
 	var result = [],
-		outputAttribute = function(name,value) {
-			result.push(" " + name + "=\"" + value + "\"");
+		attributes = {},
+		outputAttribute = function(name,transform,dontDelete) {
+			if(name in attributes) {
+				var value = attributes[name];
+				if(transform)
+					value = transform(value);
+				result.push(" " + name + "=\"" + value + "\"");
+				if(!dontDelete) {
+					delete attributes[name];
+				}
+			}
 		};
-	result.push("\n
");
 	result.push(utils.htmlEncode(tid.fields.text));