-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Answering myself, I have now a class variable to determine how to handle
these cases. If it is set to "don't tolerate", it inserts
<error type="heading" reason="trailing blank"/>
for this specific error, and renders it at plain text.
Magnus
Magnus Manske schrieb:
I have uploaded a new version with bugfixes and major
speed
improvements. It now parses about 20KB of wiki text per second on my
machine (which is still slower than out current parser, as I am well aware).
Jim Higson schrieb:
>A suggestion on this kind of error:
>
>I think the best behaviour is to try to work out what the user intended, but
>not correct it in the parser, because without formal definition and when a
>parser is used as the reference of the language anything it doesn't mark as
>an error becomes valid syntax.
That is a good idea, but it depends on the user getting direct feedback
from the parser. But unless I can make mine orders of magnitudes faster,
it probably won't becom out "live" default parser.
That means for whatever purpose it will be used, the result should look
like the one from out "official" parser. When you export a nice-looking
wiki page into (e.g.) PDF, you don't want to lose headings in the
process. You'd have to look through all of the output carefully (bugs
might be less visible than missing headings), verifying the parser.
Of course, if this would ever be adopted as the "official machine", it
would be a different situation altogether.
Magnus
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)wikimedia.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Thunderbird -
http://enigmail.mozdev.org
iD8DBQFCVmbnCZKBJbEFcz0RAkyqAJ9cL/2nZBR/C814wGMvzx6zYbj6jgCeKBk/
G74LpYeJwK6vkq3gSj7oYgA=
=kXva
-----END PGP SIGNATURE-----