mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-27 19:42:50 +00:00
![Jeremy Ruston](/assets/img/avatar_default.png)
Some leftover code meant that tiddlers titled with the precise search term were excluded from the results.
27 lines
486 B
JavaScript
27 lines
486 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/search.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for searching for the text in the operand tiddler
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.search = function(source,operator,options) {
|
|
var invert = operator.prefix === "!";
|
|
return options.wiki.search(operator.operand,{
|
|
titles: source,
|
|
invert: invert
|
|
});
|
|
};
|
|
|
|
})();
|