On 30/04/07, aretai aretai <aretaiuc(a)gmail.com> wrote:
$array = explode(' ', $input);
Note you have to create a new object Parser();
Depending on the circumstances, it might be possible to reuse the
existing reference to the parent parser (third argument to the hook
function) to do the parsing, thus ensuring things like links, etc. are
kept in the ParserOutput. You can look at extensions such as Poem and
Cite to see how this might be done.
If that's not the case, then you need to use a *clone* of the existing
parser, assuming you don't want it to forget about existing hook
extensions, etc. and other configuration settings applied to the
$wgParser object.
This can be done with the line:
$localParser = clone $parser;
Rob Church