Jump to content

One-pass parser

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Brooke Vibber (talk | contribs) at 03:37, 13 March 2003 (Hmm). It may differ significantly from the current version.

Our current wikitext parser goes through many passes, with many regexps and a few explode()/implode()s. Not only is it kinda slow, it's prone to horrible frightening bugs when different levels interfere with each other (such as the URL-in-URL bugs).

One, or at least fewer, passes would be good.

Magnus has, according to rumour, written such a thing for WINOR. Could it be adapted? (It doesn't appear to handle nested italics & bold properly; may have other problems. Also doesn't touch HTML yet, but that's a separate step really.)