django-wiki/django-wiki — pull request #336 by jluttine (2014-11-04 22:27:54+00:00)
Title: Fix issues in macro plugin regex

The list of fixes and some examples that work incorrectly in the current regex:

* can have several optional arguments without squashing everything into one argument
* ```[article_list title:"My title" depth:2]```
* ```[article_list depth:2 title:"My title"]```
* the value of an argument can be one word or several words in single or double quotes
* ```[article_list title:"Double quoted title"]```
* macro is matched only if all its optional arguments are valid
* ```[article_list depth: ]``` <-- not valid, should not be matched
* correct handling of ] character in the value of an argument
* ```[article_list depth:2] this is not macro anymore ]```
* ```[article_list title:"Index]"``` <-- this should not be valid macro syntax
* handles whitespace everywhere (if some whitespace is not wanted to be valid, can be modified):
* ```[ article_list]```
* ```[article_list ]```
* ```[article_list depth : 2]```

It is useful to have the pull request https://github.com/django-wiki/django-wiki/pull/334 merged in order to test ```title``` argument.