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.name = "validateregexp";
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);
};
})();
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/29a80145-2075-4100-9b6d-3682548b32f4n%40googlegroups.com.