On Sun, 2006-03-26 at 03:08 +0000, Ævar Arnfjörð Bjarmason wrote:
This fixes the "Bug 2702: Mismatched <i>,
<b> and <a> tags are
invalid" test case but it's not really an improvement. The test case
was supposed to demonstrate that we don't balance tags, which this
doesn't fix, it merely hacks around very specific cases with regular
expressions which fail if you insert more tags which would be fixed in
a parser that balanced tags properly.
I'm all for fixing the parser, but it's not an improvement to make
that parser test cases we have pass by basically writing a hack in the
parser to make just that test pass rather than fixing the core issue.
Ævar,
i'm the last one to disagree with you about the core issue.
I did start an (unfinished) attempt to write a Bison-based parser, and i
added tidy support to MediaWiki to get at least close to xhtml.
Timwi and others got further with the flexbisonparse module in CVS.
But still as it stands the parser in use is a sophisticated regexp
collection.
While i would welcome all effort being directed towards a proper
solution of the core issue this is simply not happening right now, for
various reasons. Shifting the focus of MediaWiki development from the
current parser to a better solution is difficult at best, i doubt
anything short of doing the full implementation or funding it will do. I
would love to be wrong on this though, and i would really like to work
on such a parser.
My task at hand was to fix bugs in the current parser, not working on a
replacement for it. The change above makes MediaWiki-generated (x)html
slightly less invalid, so i consider it an improvement overall.
--
Gabriel Wicke
MediaWiki hosting, support and development
http://wikidev.net wicke(a)wikidev.net
Phone +49 (0)431-5569001, Mob +49 (0)177 2065127
Eckernförder Str.58, 24116 Kiel