From: Yuval Kogman Date: Fri, 30 Dec 2005 20:14:33 +0000 (+0000) Subject: make pre tags in the error page wrap instead of scroll, while style being pre-ish... X-Git-Tag: 5.7099_04~762 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=2666dd3ba45edb0fa31508f67d94fe80072f94f6;hp=02d2619e275aefc0e4e6d4c08cbeff09d66d9f32 make pre tags in the error page wrap instead of scroll, while style being pre-ish. sri: please see if you're OK with this --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 423cf41..44176bc 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -102,7 +102,7 @@ sub finalize_error { . '

' } @{ $c->error }; $error ||= 'No output'; - $error = "
$error
"; + $error = qq{
$error
}; $title = $name = "$name on Catalyst $Catalyst::VERSION"; $name = "

$name

"; @@ -128,7 +128,7 @@ sub finalize_error { push @infos, sprintf <<"EOF", $name, $value;

%s

-
%s
+
%s
EOF $i++; @@ -233,6 +233,15 @@ EOF font-size: medium; font-weight: normal; } + /* from http://users.tkk.fi/~tkarvine/linux/doc/pre-wrap/pre-wrap-css3-mozilla-opera-ie.html */ + /* Browser specific (not valid) styles to make preformatted text wrap */ + pre { + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + }