mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fixed bug with default value in lookup operator (#5088)
* Fixed bug with default value in lookup operator * Fixed test for lookup operator with default
This commit is contained in:
parent
d2f87d6200
commit
51ca14861e
@ -22,7 +22,7 @@ Export our filter function
|
||||
exports.lookup = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(options.wiki.getTiddlerText(operator.operand + title) || options.wiki.getTiddlerText(operator.operand + operator.suffix));
|
||||
results.push(options.wiki.getTiddlerText(operator.operand + title) || operator.suffix);
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
@ -207,7 +207,7 @@ function runTests(wiki) {
|
||||
|
||||
it("should handle the lookup operator", function() {
|
||||
expect(wiki.filterTiddlers("Six Seventh 8 +[lookup[Tiddler]]").join(",")).toBe("Missing inaction from TiddlerOne,,Tidd");
|
||||
expect(wiki.filterTiddlers("Six Seventh 8 +[lookup:8[Tiddler]]").join(",")).toBe("Missing inaction from TiddlerOne,Tidd,Tidd");
|
||||
expect(wiki.filterTiddlers("Six Seventh 8 +[lookup:8[Tiddler]]").join(",")).toBe("Missing inaction from TiddlerOne,8,Tidd");
|
||||
});
|
||||
|
||||
it("should retrieve shadow tiddlers", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user