Don't count references to shadow tiddlers as missing tiddlers

This commit is contained in:
Jeremy Ruston 2013-05-31 17:53:11 +01:00
parent ac32b09db3
commit bf4216f3ac
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}
});

View File

@ -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");

View File

@ -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