News for hackers. Stuff that matters.
Re:Open-source app releases first complete copy of English W... by fauigerzigerk on Tuesday November 26, 2013 @04:41AM (#6800159)
It is indeed a challenge. The mediawiki syntax is the weirdest mess I have ever had to parse. There is no spec, real world usage deviates significantly from the help docs, and it's a Turing complete language with heaps of backwards compatibility hacks. So if you have something reasonably complete and correct than kudos to you!
Re:Open-source app releases first complete copy of English W... by gnosygnu on Tuesday November 26, 2013 @08:37AM (#6801059)
Thanks. The syntax was challenging, especially all the template syntax ("{{my_template|{{{argument1|defaultvalue|{{nested_template}}}}}}}"). Fortunately, the new lua module should eventually replace the template syntax, which should make it easier for future parsers.
Re:Open-source app releases first complete copy of English W... by tommorris on Tuesday November 26, 2013 @06:50AM (#6800567)
The visual editor uses a new parser, Parsoid, which has been implemented separately in node.js (iirc). That may be the answer...
Re:Open-source app releases first complete copy of English W... by gnosygnu on Tuesday November 26, 2013 @08:40AM (#6801077)
Yup. It also has its own DOM, rather than continuously adding to one string and repeatedly running regex's on it (which is what MediaWiki does today).

I was already pretty far along with my own parser before Parsoid was usable though. (and my parser has its own DOM / hooks)

Re:Open-source app releases first complete copy of English W... by tommorris on Tuesday November 26, 2013 @09:36AM (#6801449)
MediaWiki is such an astoundingly fugly piece of software.