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...
So you have tags around all the content saying what language it's in,
and only the correct language should be displayed?
I can't see why there would be blank space, your code looks correct to
me. Do you have a demo website where I can see it running?