mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-22 23:16:53 +00:00
Stopped caching renderer output
It means we're inadvertently caching the missing/resolved state of links
This commit is contained in:
parent
25947bc1d1
commit
7fdd8985ef
@ -5,7 +5,6 @@ WikiStore uses the .cache member of tiddlers to store the following information:
|
||||
|
||||
parseTree: Caches the parse tree for the tiddler
|
||||
renderers: Caches rendering functions for this tiddler (indexed by MIME type)
|
||||
renditions: Caches the renditions produced by those functions (indexed by MIME type)
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@ -321,24 +320,17 @@ WikiStore.prototype.renderTiddler = function(targetType,title,templateTitle,opti
|
||||
var noWrap = options.noWrap || this.disableHtmlWrapperNodes,
|
||||
tiddler = this.getTiddler(title),
|
||||
renderer = this.compileTiddler(templateTitle,targetType),
|
||||
renditions = this.getCacheForTiddler(templateTitle,"renditions",function() {
|
||||
return {};
|
||||
}),
|
||||
template,
|
||||
content;
|
||||
if(tiddler) {
|
||||
content = renderer.render(tiddler,this);
|
||||
if(title !== templateTitle) {
|
||||
template = this.getTiddler(templateTitle);
|
||||
content = renderer.render(tiddler,this);
|
||||
return noWrap ? content : HTML(HTML.elem("div",{
|
||||
"data-tw-render-tiddler": title,
|
||||
"data-tw-render-template": templateTitle
|
||||
},[HTML.raw(content)]),targetType);
|
||||
} else {
|
||||
if(!renditions[targetType]) {
|
||||
renditions[targetType] = renderer.render(tiddler,this);
|
||||
}
|
||||
content = renditions[targetType];
|
||||
return noWrap ? content : HTML(HTML.elem("div",{
|
||||
"data-tw-render-tiddler": title
|
||||
},[HTML.raw(content)]),targetType);
|
||||
|
Loading…
Reference in New Issue
Block a user