On Tue, Nov 13, 2007 at 05:59:59PM +0000, Thomas Dalton wrote:
I think toggles is the only way to do it, although
even then it's hard
since the result isn't going to be a tree.
The only alternative I can think of is running the wikitext through a
tidier first that detects that kind of mess and adds the appropriate
close and reopen tags. It requires an extra pass through the text, but
might be unavoidable. Basically, we accept that wikitext can't be
described by EBNF, so start by parsing the wikitext into a more
restrictive form of wikitext which can be described by EBNF, and then
parsing that. It's a mess, but it's probably better than what we have
at the moment.
Note that this totally screws the people who are hoping for a clean
WT-XML parser.
Cheers,
-- jra
--
Jay R. Ashworth Baylink jra(a)baylink.com
Designer The Things I Think RFC 2100
Ashworth & Associates
http://baylink.pitas.com '87 e24
St Petersburg FL USA
http://photo.imageinc.us +1 727 647 1274