Yes, I'm trying to keep things consistent. The only location my idea for a processor differs from current syntax is in the insane edge cases. And at that, only the two most unlikely of them. I'd like to track down the bug report related to that off rendering. I can't imagine anywhere someone would be relying on [[Image:File.ext|[[Image:File.ext|[[link]]]]]] rendering a [[link]] and the rest verbatim. However there might be an insane use of [[Image:File.ext|[[Image:File.ext|Caption]]]].
Well, yes. Link syntax is not a one stop thing for use, in fact in comparison to ParserFunctions the features are going to be substandard. However there are some nice cases where extending a link fits the syntax better than using a parser function. Especially with embedding the Image: namespace, and how it could be extended to embed things like Audio: and such. SMW Also uses annotations, which do most of the time fit in as link like syntax. SMW Could use an #annotate pfunc for the ugly cases, but that's beside the case here. It would still be good to preserve the old syntax where possible.
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of: -The Nadir-Point Group (http://nadir-point.com) --It's Wiki-Tools subgroup (http://wiki-tools.com) --The ElectronicMe project (http://electronic-me.org) --Games-G.P.S. (http://ggps.org) -And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) --Animepedia (http://anime.wikia.com) --Narutopedia (http://naruto.wikia.com)
Brion Vibber wrote:
-----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
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkilrQEACgkQwRnhpk1wk47wFgCg33invc1nWH9YgMPtv/inCOZR jc4AoNtXmRScusO58z6v9/ixwjQkpN4V =KRgM -----END PGP SIGNATURE-----