]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/linkify_and_preprocessor_ordering.mdwn
response
[ikiwiki.git] / doc / todo / linkify_and_preprocessor_ordering.mdwn
1 Currently ikiwiki linkifies text, then runs preprocessor directives. This
2 allows a directive to contain a wikilink inside a parameter, but since the
3 wikilink expands to some arbitrary html, the parameter needs to be
4 triple-quoted to avoid quotes in the expanded text from leaking out. This
5 is rather non-obvious.
6
7 One fix would be to switch the order, since linkification and preprocessing
8 are relatively independant. Some directives, like inline, would need to keep
9 on linkifiying the inlined pages, to make the links be resolved correctly,
10 but that's ok. Any directives that outputed stuff that looked like a
11 wikilink, but wasn't, would need to be changed.
12
13 > This solution has been implemented and _seems_ ok.
14
15 An alternative would be to change the wikilink regexp so it doesn't apply
16 to wikilinks that are embedded inside preprocessor directives. I haven't
17 found a way to do that yet, since perl doesn't allow variable-width
18 negative lookbehind.
19
20 Maybe processing wikilinks and preprocessor directives
21 as part of the same loop would work, but that probably has its own
22 issues.
23
24 [[todo/done]]