protected function doCodeBlocks($text)
{
#
# Process Markdown `<pre><code>` blocks.
#
$text = preg_replace_callback('{
(?:\\n\\n|\\A\\n?)
( # $1 = the code block -- one or more lines, starting with a space/tab
(?>
[ ]{' . $this->tab_width . '} # Lines must start with a tab or a tab-width of spaces
.*\\n+
)+
)
((?=^[ ]{0,' . $this->tab_width . '}\\S)|\\Z) # Lookahead for non-space at line-start, or end of doc
}xm', array(&$this, '_doCodeBlocks_callback'), $text);
return $text;
}