Hello! What is wrong? I don't understand how to find out this and debug.
1. I created my macros tiddler;
2. Added
$:/tags/Macro tag;
3. Try to use these ways. It results just nothing.
3.a. <<validateregexp "this||or that|">>
3.b. <$macrocall $name="validateregexp" text="Text to be made into italics"/>
4. checked <<dumpvariables>>. There is no my macros...
Here is my macro exportred:
module-type: macro
tags: $:/tags/Macro
title: $:/hyperbook/validateregexp.js
type: application/javascript
/*\
title: $:/hyperbook/validateregexp.js
type: application/javascript
module-type: macro
Macro to return a clean regexp that does not hang-up the whole wiki and does not get out-of-memory
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.params = [
{name: "regexp"}];
/*
Run the macro
*/
exports.run = function(regexp) {
regexp= str(regexp).replace(/([\|\\\{\}]){2,}/g, "$1");
regexp= str(regexp).replace(/^([\|]){1,}/g, "");
regexp= str(regexp).replace(/([\|]){1,}$/g, "");
return regexp;
// if(!baseName) {
// baseName = $tw.language.getString("DefaultNewTiddlerTitle");
// }
// return this.wiki.generateNewTitle(baseName, options);
};
})();