[Mediawiki-l] ^<nowiki></nowiki>{{#myparserfun:...}} (Adventures in MediaWiki)

Brian Brian.Mingus at colorado.edu
Thu Aug 13 18:12:37 UTC 2009


I created a simple parser function that inserts a one line div into the
page. It worked as expected except in the case where it was the first bit of
wikitext in the article. In that case, the parser inserted <p><br/></p> into
the page just before the div creating an ugly gap that wasted space. I then
discovered that if I wrote <nowiki></nowiki> just before my parser function
that this paragraph block was ommitted and I got the expected behavior. So I
ended up wrapping my parser function in a template of the same name that
also inserts the nowiki code, and voila, problem "solved." !

/brian


More information about the MediaWiki-l mailing list