From bf4216f3ac5ffbb072ef55e76897a018b634f139 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 31 May 2013 17:53:11 +0100 Subject: [PATCH] Don't count references to shadow tiddlers as missing tiddlers --- core/modules/wiki.js | 2 +- editions/test/tiddlers/tests/test-filters.js | 2 +- editions/tw5.com/tiddlers/talkytalky/TalkyTalky.tid | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 8fbc15bcc..670c40a84 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -333,7 +333,7 @@ exports.getMissingTitles = function() { this.forEachTiddler(function(title,tiddler) { var links = self.getTiddlerLinks(title); $tw.utils.each(links,function(link) { - if(!self.tiddlerExists(link) && missing.indexOf(link) === -1) { + if((!self.tiddlerExists(link) && !self.isShadowTiddler(link)) && missing.indexOf(link) === -1) { missing.push(link); } }); diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index 9cd59590b..f86e08d01 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -173,7 +173,7 @@ describe("Filter tests", function() { }); it("should handle the '[is[missing]]' operator", function() { - expect(wiki.filterTiddlers("[is[missing]]").join(",")).toBe("TiddlerZero,TiddlerSix,TiddlerTwo"); + expect(wiki.filterTiddlers("[is[missing]]").join(",")).toBe("TiddlerZero,TiddlerTwo"); expect(wiki.filterTiddlers("[!is[missing]sort[title]]").join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,Tiddler Three,TiddlerOne"); expect(wiki.filterTiddlers("[[TiddlerOne]is[missing]]").join(",")).toBe(""); expect(wiki.filterTiddlers("[[TiddlerZero]is[missing]]").join(",")).toBe("TiddlerZero"); diff --git a/editions/tw5.com/tiddlers/talkytalky/TalkyTalky.tid b/editions/tw5.com/tiddlers/talkytalky/TalkyTalky.tid index 9b3060638..cafb9db6a 100644 --- a/editions/tw5.com/tiddlers/talkytalky/TalkyTalky.tid +++ b/editions/tw5.com/tiddlers/talkytalky/TalkyTalky.tid @@ -25,7 +25,7 @@ Store your tiddlers in a single HTML file along with the JS # Create tiddlers, show links, missing, orphans, tags, tagging, references # Use missing tiddlers to find a typo # Show shadow tiddlers and system tiddlers -# Show stylesheet handling - [[$:/themes/snowwhite/base]] +# Show stylesheet handling - [[$:/themes/tiddlywiki/snowwhite/base]] # Drag an image from the file system # Use the image in a tiddler # Edit the image