mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-05-18 23:34:07 +00:00
Make getContextScopeId() more selective about context fields that are included
We were getting a problem whereby macro definitions were showing up in the context string.
This commit is contained in:
parent
6299026407
commit
627dba01e4
@ -129,11 +129,14 @@ WikiRenderTree.prototype.checkContextRecursion = function(renderer,newContext) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
WikiRenderTree.prototype.getContextScopeId = function(renderer) {
|
WikiRenderTree.prototype.getContextScopeId = function(renderer) {
|
||||||
var guidBits = [];
|
var guidBits = [],
|
||||||
|
scopeComponents = ["tiddlerTitle","templateTitle"];
|
||||||
while(renderer) {
|
while(renderer) {
|
||||||
if(renderer.context) {
|
if(renderer.context) {
|
||||||
$tw.utils.each(renderer.context,function(field,name) {
|
$tw.utils.each(renderer.context,function(field,name) {
|
||||||
guidBits.push(name + ":" + field + ";");
|
if(scopeComponents.indexOf(name) !== -1) {
|
||||||
|
guidBits.push(name + ":" + field + ";");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
guidBits.push("-");
|
guidBits.push("-");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user