What method are you using to stop the non-matched content being displayed?
How much empty space? A blank line or two, or the entire space the non-matched content would take up were it displayed?
I match the wanted tags by using following syntax...
function wfRenderArticleSectionCheck($input, $args, &$parser) { global $wgTitle, $wgArticle, $wgParser, $wgLang, $wgLanguageCode; $lan = $wgLang->getCode(); if($args[lan] == $lan) { return $input; } else { return ''; } }
The empty space is conform with the entire space the non-matched content would take up...