Improve output styling, still inline

This commit is contained in:
Thomas Gelf 2014-03-08 08:29:39 +00:00
parent 69b91adedb
commit 63caf15494

View File

@ -18,7 +18,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
} elseif (preg_match('~\\\n~', $output)) { } elseif (preg_match('~\\\n~', $output)) {
// Plaintext // Plaintext
$output = '<pre style="font-family: monospace; font-size: 1em;' $output = '<pre style="font-family: monospace; font-size: 1em;'
. ' width: 90%; overflow: auto;">' . ' width: 100%; overflow: auto; white-space: pre-wrap;">'
. preg_replace( . preg_replace(
'~\\\n~', "\n", preg_replace( '~\\\n~', "\n", preg_replace(
'~\\\n\\\n~', "\n", '~\\\n\\\n~', "\n",
@ -26,15 +26,15 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
preg_replace('~\[WARNING\]~', '<span class="warning">[WARNING]</span>', preg_replace('~\[WARNING\]~', '<span class="warning">[WARNING]</span>',
preg_replace('~\[CRITICAL\]~', '<span class="error">[CRITICAL]</span>', preg_replace('~\[CRITICAL\]~', '<span class="error">[CRITICAL]</span>',
preg_replace('~\@{6,}~', '@@@@@@', preg_replace('~\@{6,}~', '@@@@@@',
$this->view->escape(wordwrap($output, 80, "\n", true)) $this->view->escape($output)
)))) ))))
) )
) . '</pre>'; ) . '</pre>';
} else { } else {
$output = '<pre style="font-family: monospace; font-size: 1em;' $output = '<pre style="font-family: monospace; font-size: 1em;'
. ' width: 90%; overflow: auto;">' . ' width: 100%; overflow: auto; white-space: pre-wrap;">'
. preg_replace('~\@{6,}~', '@@@@@@', . preg_replace('~\@{6,}~', '@@@@@@',
$this->view->escape(wordwrap($output, 80, "\n", true)) $this->view->escape($output)
) . '</pre>'; ) . '</pre>';
} }
$output = $this->fixLinks($output); $output = $this->fixLinks($output);