mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 13:29:56 +00:00
Fix caching of parse variables/macros/procedures
This commit is contained in:
parent
966707ea1c
commit
a439cb58be
@ -176,13 +176,13 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()}),
|
||||
srcVariable = variableInfo && variableInfo.srcVariable;
|
||||
if(srcVariable) {
|
||||
var mode = parseAsInline ? "inlineParser" : "blockParser";
|
||||
if(srcVariable.isCacheable && srcVariable[mode]) {
|
||||
parser = srcVariable[mode];
|
||||
var cacheKey = (parseAsInline ? "inlineParser" : "blockParser") + (this.transcludeType || "");
|
||||
if(variableInfo.isCacheable && srcVariable[cacheKey]) {
|
||||
parser = srcVariable[cacheKey];
|
||||
} else {
|
||||
parser = this.wiki.parseText(this.transcludeType,variableInfo.text || "",{parseAsInline: parseAsInline, configTrimWhiteSpace: srcVariable.configTrimWhiteSpace});
|
||||
if(srcVariable.isCacheable) {
|
||||
srcVariable[mode] = parser;
|
||||
if(variableInfo.isCacheable) {
|
||||
srcVariable[cacheKey] = parser;
|
||||
}
|
||||
}
|
||||
if(parser) {
|
||||
|
Loading…
Reference in New Issue
Block a user