mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Refactored interface of TiddlerOutput
This commit is contained in:
parent
c82492564c
commit
f3554f1b29
@ -166,7 +166,7 @@ Recipe.ingredientOutputter = {
|
|||||||
// Ordinary tiddlers are output as a <DIV>
|
// Ordinary tiddlers are output as a <DIV>
|
||||||
for(var t=0; t<ingredient.length; t++) {
|
for(var t=0; t<ingredient.length; t++) {
|
||||||
var tid = ingredient[t];
|
var tid = ingredient[t];
|
||||||
tiddlerOutput.outputTiddlerDiv(out,tid);
|
out.push(tiddlerOutput.outputTiddlerDiv(tid));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
javascript: function(out,ingredient) {
|
javascript: function(out,ingredient) {
|
||||||
@ -198,7 +198,7 @@ Recipe.ingredientOutputter = {
|
|||||||
} else {
|
} else {
|
||||||
tweakedTiddler = tid;
|
tweakedTiddler = tid;
|
||||||
}
|
}
|
||||||
tiddlerOutput.outputTiddlerDiv(out,tweakedTiddler);
|
out.push(tiddlerOutput.outputTiddlerDiv(tweakedTiddler));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ tid - the tiddler to be output
|
|||||||
options - options:
|
options - options:
|
||||||
omitPrecedingLineFeed - determines if a linefeed is inserted between the <PRE> tag and the text
|
omitPrecedingLineFeed - determines if a linefeed is inserted between the <PRE> tag and the text
|
||||||
*/
|
*/
|
||||||
tiddlerOutput.outputTiddlerDiv = function(out,tid) {
|
tiddlerOutput.outputTiddlerDiv = function(tid) {
|
||||||
var result = [];
|
var result = [];
|
||||||
var outputAttribute = function(name,value) {
|
var outputAttribute = function(name,value) {
|
||||||
result.push(" " + name + "=\"" + value + "\"");
|
result.push(" " + name + "=\"" + value + "\"");
|
||||||
@ -43,7 +43,7 @@ tiddlerOutput.outputTiddlerDiv = function(out,tid) {
|
|||||||
result.push(">\n<pre>\n");
|
result.push(">\n<pre>\n");
|
||||||
result.push(utils.htmlEncode(tid.fields.text));
|
result.push(utils.htmlEncode(tid.fields.text));
|
||||||
result.push("</pre>\n</div>");
|
result.push("</pre>\n</div>");
|
||||||
out.push(result.join(""));
|
return result.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
tiddlerOutput.stringifyTags = function(tags) {
|
tiddlerOutput.stringifyTags = function(tags) {
|
||||||
|
Loading…
Reference in New Issue
Block a user