1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 16:53:14 +00:00
TiddlyWiki5/core/modules/filters/wikiparserrules.js
Jermolene d5e690a06d First pass at global disabling of parser rules
This is to address #1875 more quickly than via #345.

This commit only includes a partial implementation of the UI - see the
ticket for details.
2015-07-30 12:28:29 +01:00

31 lines
599 B
JavaScript

/*\
title: $:/core/modules/filters/wikiparserrules.js
type: application/javascript
module-type: filteroperator
Filter operator for returning the names of the wiki parser rules in this wiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.wikiparserrules = function(source,operator,options) {
var results = [];
$tw.utils.each($tw.modules.types.wikirule,function(mod) {
var exp = mod.exports;
if(exp.types[operator.operand]) {
results.push(exp.name);
}
});
results.sort();
return results;
};
})();