On Thu, 25 Oct 2007 11:04:02 +1000, Steve Bennett wrote:
On 10/25/07, Steve Sanbeg ssanbeg@ask.com wrote:
The syntax looks ambiguous with a numbered list. It should have braces, i.e.:
In the same way that #REDIRECT foo is "ambiguous". That's the analogy I was thinking of when I suggested this syntax. I'm not familiar with the reasons for our different types of syntax.: #REDIRECT, {{defaultsort}}, __NOTOC__, <ref>...
#REDIRECT is disambiguated with a flag in the DB, which separates redirects from real articles. That way, if you see #REDIRECT it's unambiguously a list item. This won't work if you want to put alias in some random place in the text.
__NOTOC__ is a magic word in the parser. Things like {{defaultsort}} and <ref> can be implemented as extensions, without hacking the core code, which would certainly make life easier when implementing this.
{{#ALIASES:Thomas[-]Fran[ç|c]ois Dalibard}}
If that's the best way, then sure. I was slightly concerned that the | would be misinterpreted.
True, you'd need to find a way around that; either turn off that splitting, use a different character, or reassemble the string, and live without the missing whitespace.
XML should also work:
<aliases>Thomas[-]Fran[ç|c]ois Dalibard</aliases>
I guess. It's a bit wordier.
For a single alias, yes. For multiple aliases, it would seem clearer to just list them one per line in an <aliases> block than the alternatives with parser syntax. And this would give you a block of unbroken text, so no need to worry about the parser messing it up before you see it.
I'm not sure which would end up being the best, but it seems like either could work. It's definitely better to implement it as an extension than to hack completely new syntax into the parser.
-Steve
Steve