aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/nested_preprocessor_directives.mdwn
blob: 7e7ef3a49bec60ad1bd4c784d286f043dcfe5d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Ikiwiki's preprocessor parser cannot deal with arbitrary nested preprocesor
directives. It's possible to nest a directive with single quoted values
inside a triple-quoted value of a directive, but that's all.

It's not possible to unambiguously parse nested quotes, so to support
nesting, a new syntax would be needed. Maybe something xml-like?

> You can, however, unambiguously parse nested square brackets, and I think
> that would solve the problem, as long as you never allow the contents of a
> directive to contain a *partial* directive, which seems reasonable to me.
>
> For example, I *think* you can unambiguously parse the following:
>
>     \[[if test="enabled(template) and templates/foo" then="""
>     [[template id=foo content="""Flying Purple People Eater"""]]
>     """]]
>
> --[[JoshTriplett]]