-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Daniel Friesen wrote:
[[Image:File.ext|Caption]] Renders as a image with "Caption" [[Image:File.ext|[[Image:File.ext|Caption]]]] Renders an image inside of another image that has a caption of "Caption". [[Image:File.ext|[[Image:File.ext|[[link]]]]]] Renders [[link]] as a link, the rest is completely verbatim.
Honestly, the syntax is inconsistent with itself. If we were trying to stop embeds inside of embeds, then the last one should render as an image, with a link to [[link]] and the other Image: verbatim as a caption.
Yes, links are not currently fully 'embeddable' in a recursive way. :( You're currently allowed just one level of 'link embedding' in the caption area for Image: links, and even that's special-cased.
It was basically stuck in as a hack on the existing link parsing, which was optimized for doing a single flat pass of links through the entire page; after we extended link syntax to allow image captions, there was a need to hack it up to allow links in the captions...
If it can be more cleanly done in a way that, as it happens, lets you do multiple levels cleanly, that would probably be just great! But definitely try to keep it clean and consistent. :)
In general though I'm not sure we should concentrate on using link syntax here, though; the trend these days seems to be to use parser functions for such things.
- -- brion