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:
Cameron Fischer
2021-01-29 08:26:31 -05:00
committed by GitHub
parent 4667139864
commit 45355a7fcf
5 changed files with 139 additions and 59 deletions

View File

@@ -90,7 +90,7 @@ describe("HTML tag new parser tests", function() {
{ type : 'macro-parameter', start : 0, value : 'one two three', end : 17 }
);
expect($tw.utils.parseMacroParameter("myparam>",0)).toEqual(
{ type : 'macro-parameter', start : 0, value : 'myparam', end : 7 }
{ type : 'macro-parameter', start : 0, value : 'myparam>', end : 8 }
);
});