mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-15 08:49:42 +00:00
d5e690a06d
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.
31 lines
599 B
JavaScript
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;
|
|
};
|
|
|
|
})();
|