}
break;
case XMLReader::END_ELEMENT:
- array_shift($nesting, $reader->name);
+ array_shift($nesting);
if (isset(static::$tagMap[$reader->name])) {
$store .= '</' . static::$tagMap[$reader->name] . '>';
} else if (isset(static::$styleClassMap[$reader->name])) {
if ($nesting[0] != 'monospace') {
$text = nl2br($text);
}
+ $text = preg_replace_callback(
+ "#^\t+#m",
+ function ($matches) {
+ return str_repeat(
+ ' ', strlen($matches[0]) * 8
+ );
+ },
+ $text
+ );
$store .= $text;
break;
default: