mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-11 00:03:48 +00:00
Don't count references to shadow tiddlers as missing tiddlers
This commit is contained in:
parent
ac32b09db3
commit
bf4216f3ac
@ -333,7 +333,7 @@ exports.getMissingTitles = function() {
|
|||||||
this.forEachTiddler(function(title,tiddler) {
|
this.forEachTiddler(function(title,tiddler) {
|
||||||
var links = self.getTiddlerLinks(title);
|
var links = self.getTiddlerLinks(title);
|
||||||
$tw.utils.each(links,function(link) {
|
$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);
|
missing.push(link);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -173,7 +173,7 @@ describe("Filter tests", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should handle the '[is[missing]]' operator", 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("[!is[missing]sort[title]]").join(",")).toBe("$:/TiddlerTwo,a fourth tiddler,Tiddler Three,TiddlerOne");
|
||||||
expect(wiki.filterTiddlers("[[TiddlerOne]is[missing]]").join(",")).toBe("");
|
expect(wiki.filterTiddlers("[[TiddlerOne]is[missing]]").join(",")).toBe("");
|
||||||
expect(wiki.filterTiddlers("[[TiddlerZero]is[missing]]").join(",")).toBe("TiddlerZero");
|
expect(wiki.filterTiddlers("[[TiddlerZero]is[missing]]").join(",")).toBe("TiddlerZero");
|
||||||
|
@ -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
|
# Create tiddlers, show links, missing, orphans, tags, tagging, references
|
||||||
# Use missing tiddlers to find a typo
|
# Use missing tiddlers to find a typo
|
||||||
# Show shadow tiddlers and system tiddlers
|
# 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
|
# Drag an image from the file system
|
||||||
# Use the image in a tiddler
|
# Use the image in a tiddler
|
||||||
# Edit the image
|
# Edit the image
|
||||||
|
Loading…
x
Reference in New Issue
Block a user