mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +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
|
parseTree: Caches the parse tree for the tiddler
|
||||||
renderers: Caches rendering functions for this tiddler (indexed by MIME type)
|
renderers: Caches rendering functions for this tiddler (indexed by MIME type)
|
||||||
renditions: Caches the renditions produced by those functions (indexed by MIME type)
|
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
@ -321,24 +320,17 @@ WikiStore.prototype.renderTiddler = function(targetType,title,templateTitle,opti
|
|||||||
var noWrap = options.noWrap || this.disableHtmlWrapperNodes,
|
var noWrap = options.noWrap || this.disableHtmlWrapperNodes,
|
||||||
tiddler = this.getTiddler(title),
|
tiddler = this.getTiddler(title),
|
||||||
renderer = this.compileTiddler(templateTitle,targetType),
|
renderer = this.compileTiddler(templateTitle,targetType),
|
||||||
renditions = this.getCacheForTiddler(templateTitle,"renditions",function() {
|
|
||||||
return {};
|
|
||||||
}),
|
|
||||||
template,
|
template,
|
||||||
content;
|
content;
|
||||||
if(tiddler) {
|
if(tiddler) {
|
||||||
|
content = renderer.render(tiddler,this);
|
||||||
if(title !== templateTitle) {
|
if(title !== templateTitle) {
|
||||||
template = this.getTiddler(templateTitle);
|
template = this.getTiddler(templateTitle);
|
||||||
content = renderer.render(tiddler,this);
|
|
||||||
return noWrap ? content : HTML(HTML.elem("div",{
|
return noWrap ? content : HTML(HTML.elem("div",{
|
||||||
"data-tw-render-tiddler": title,
|
"data-tw-render-tiddler": title,
|
||||||
"data-tw-render-template": templateTitle
|
"data-tw-render-template": templateTitle
|
||||||
},[HTML.raw(content)]),targetType);
|
},[HTML.raw(content)]),targetType);
|
||||||
} else {
|
} else {
|
||||||
if(!renditions[targetType]) {
|
|
||||||
renditions[targetType] = renderer.render(tiddler,this);
|
|
||||||
}
|
|
||||||
content = renditions[targetType];
|
|
||||||
return noWrap ? content : HTML(HTML.elem("div",{
|
return noWrap ? content : HTML(HTML.elem("div",{
|
||||||
"data-tw-render-tiddler": title
|
"data-tw-render-tiddler": title
|
||||||
},[HTML.raw(content)]),targetType);
|
},[HTML.raw(content)]),targetType);
|
||||||
|
Loading…
Reference in New Issue
Block a user