kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix the macro definition regexp
rodzic
c1ec1578ec
commit
0e418f6e8d
|
@ -6,9 +6,9 @@ module-type: wikirule
|
||||||
Wiki pragma rule for macro definitions
|
Wiki pragma rule for macro definitions
|
||||||
|
|
||||||
```
|
```
|
||||||
/define name(param:defaultvalue,param2:defaultvalue)
|
\define name(param:defaultvalue,param2:defaultvalue)
|
||||||
definition text, including $param$ markers
|
definition text, including $param$ markers
|
||||||
/end
|
\end
|
||||||
```
|
```
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
|
@ -27,7 +27,7 @@ Instantiate parse rule
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// Regexp to match
|
||||||
this.matchRegExp = /^\\define\s*([^(\s]+)\(\s*([^)]*)\)(\r?\n)?/mg;
|
this.matchRegExp = /^\\define\s+([^(\s]+)\(\s*([^)]*)\)(\r?\n)?/mg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Ładowanie…
Reference in New Issue