apri a.vd.wiel schrieb:
I see there is no formating (bold and italic) in the
message. But for
this case my conclusion is: MW formatting is (also) not correct.
The markup spec says: Note that improper nesting of bold and italics
is currently permitted.
Which means that the formatting can't be correct in all cases. The
markup spec must be more strict.
Andre
There is no "incorrect" in wikitext. any input is valid wikitext. and in the
absense of a formal specification, the correct behaviour is, per definition,
whatever mediawiki's parser does.
You are only scratching the surface of the pain that parsing wikitext is. There
have been several attempts of formalizing it, and all failed at some point -
among other reasons, because the parsing depends on localization, configuration
settings, database content, and the phase of the moon.
Basically, this is the reason why there is no really good WYSIWYG editor for
MediaWiki. I don't want to discurage you, I just want to point out where the
problems are. Some examples: the closing }} of a template may actually be
contained in the definition of another template, same with thables. I have seen
|} being replaced by something like {{TableEnd}}. Lots of fun there.
Also, you can nest images into the caption section of image links (but not
regular links). Detecting what an image link is requires you to know all aliases
of the image namespace (that would be four names on most installations)...
Anhyway, did you look at
http://www.mediawiki.org/wiki/Markup_spec ? That's the
best we have in terms of a formal spec. And it'S incomplete and abandoned.
This sucks, but in the four years we have spend talking abotu it, no one found a
way out that will not break a few million existing wiki pages.
-- daniel