protected function _processCodeBlock($matches)
    {
        list($block, $openTag, $tagName, $lang, $code, $closeTag) = $matches;
        unset($matches);

        // check language
        $lang = $this->validLang($lang);
        $code = html_entity_decode($code, ENT_QUOTES); // decode text in code block as GeSHi will re-encode it.

        if (isset($this->containerMap[$tagName])) {
            $patt = '/' . preg_quote($tagName) . '/';
            $openTag = preg_replace($patt, $this->containerMap[$tagName][0], $openTag);
            $closeTag = preg_replace($patt, $this->containerMap[$tagName][1], $closeTag);
        }

        if ($this->showPlainTextButton) {
            $button = '<a href="#null" class="geshi-plain-text">Show Plain Text</a>';
            $openTag = $button . $openTag;
        }

        if ($lang) {
            $highlighted = $this->highlightText(trim($code), $lang);
            return $openTag . $highlighted . $closeTag;
        }
        return $openTag . $code . $closeTag;
    }