mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-27 01:14:44 +00:00
Comment updates
This commit is contained in:
parent
3da70b925f
commit
e8c69ae7dc
@ -108,11 +108,14 @@ exports.addTiddler = function(tiddler,isShadow) {
|
|||||||
if(!(tiddler instanceof $tw.Tiddler)) {
|
if(!(tiddler instanceof $tw.Tiddler)) {
|
||||||
tiddler = new $tw.Tiddler(tiddler);
|
tiddler = new $tw.Tiddler(tiddler);
|
||||||
}
|
}
|
||||||
|
// Get the title, and the current tiddler with that title
|
||||||
var title = tiddler.fields.title,
|
var title = tiddler.fields.title,
|
||||||
prevTiddler = this.tiddlers[title];
|
prevTiddler = this.tiddlers[title];
|
||||||
|
// Make it be a shadow if indicated or if it is already a shadow
|
||||||
if(isShadow || (prevTiddler && prevTiddler.isShadow)) {
|
if(isShadow || (prevTiddler && prevTiddler.isShadow)) {
|
||||||
tiddler.isShadow = true;
|
tiddler.isShadow = true;
|
||||||
}
|
}
|
||||||
|
// Save the tiddler
|
||||||
this.tiddlers[title] = tiddler;
|
this.tiddlers[title] = tiddler;
|
||||||
this.clearCache(title);
|
this.clearCache(title);
|
||||||
this.touchTiddler(title);
|
this.touchTiddler(title);
|
||||||
|
Loading…
Reference in New Issue
Block a user