mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-06 01:02:17 -08:00
Refactor rendertree to simplify context handling
Get rid of the separate renderContext stack and instead have a parent pointer on renderer nodes. This lets us walk back up the render tree to resolve context references
This commit is contained in:
parent
32dc09d8ac
commit
8564602256
42 changed files with 175 additions and 183 deletions
|
|
@ -565,10 +565,10 @@ Parse text from a tiddler and render it into another format
|
|||
outputType: content type for the output
|
||||
title: title of the tiddler to be rendered
|
||||
*/
|
||||
exports.renderTiddler = function(outputType,title,renderContext) {
|
||||
exports.renderTiddler = function(outputType,title,context) {
|
||||
var parser = this.parseTiddler(title),
|
||||
renderTree = new $tw.WikiRenderTree(parser,{wiki: this});
|
||||
renderTree.execute(renderContext);
|
||||
renderTree = new $tw.WikiRenderTree(parser,{wiki: this, context: context});
|
||||
renderTree.execute();
|
||||
return renderTree.render(outputType);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue