this would be a nifty feature
[ikiwiki] / doc / todo / enable_arbitrary_markup_for_directives.mdwn
1 One of the good things about [PmWiki](http://www.pmwiki.org) is the ability to treat arbitrary markup as directives.
2 In ikiwiki, all directives have the same format:
3
4 \[[!name arguments]]
5
6 But with PmWiki, directives can be added to the engine (with the "Markup" hook) with the usual name and function passing, but also with a regexp which has capturing parentheses, and the results of the match are passed to the given function.
7 Would it be possible to alter the "preprocess" hook to have an optional regex argument which acted in a similar fashion?
8
9 For example, one could then write a plugin which would treat
10
11 Category: Foo, Bar
12
13 as a tag, by using a regex such as /^Category:\s*([\w\s,]+)$/; the result "Foo, Bar" could then be further processed by the hook function.
14
15 This could also make it easier to support more styles of markup, rather than having to do all the processing in "htmlize" and/or "filter".
16
17 -- [[KathrynAndersen]]