mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-09 12:03:01 +00:00
Wikirules now use better macrocall parser (#5451)
* wikirules now use better macrocall parser Before, wikirules would use a deficient macrocall parser which couldn't handle certain types of arguments. Now it uses the same one that the widget parser uses. Less code! * style changes and removing weird switch statement That switch statement made more sense in an earlier iteration. * comment improvements * oops, wikirule macrocalls could do ONE thing better * '=' wasn't allowed for widget macros, but why? Now they're allowed for both widget macros and macrocall macros.
This commit is contained in:
@@ -132,7 +132,7 @@ exports.parseMacroParameter = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexp
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g;
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for the parameter
|
||||
|
||||
Reference in New Issue
Block a user