Skip to content

Commit

Permalink
Strip lefthand padding from message boxes & set overflow-x to auto
Browse files Browse the repository at this point in the history
  • Loading branch information
vlyon committed Jul 28, 2015
1 parent 4f1ebb8 commit 0396832
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Dancer2/Core/Error.pm
Expand Up @@ -394,10 +394,12 @@ sub dumper {
#use Data::Dumper;
my $dd = Data::Dumper->new( [ \%data ] );
my $hash_separator = ' @@!%,+$$#._(-- '; # Very unlikely string to exist already
$dd->Terse(1)->Quotekeys(0)->Indent(1)->Sortkeys(1)->Pair($hash_separator);
my $prefix_padding = ' #+#+@%.,$_-!(( '; # Very unlikely string to exist already
$dd->Terse(1)->Quotekeys(0)->Indent(1)->Sortkeys(1)->Pair($hash_separator)->Pad($prefix_padding);
my $content = _html_encode( $dd->Dump );
$content =~ s/^.+//; # Remove the first line
$content =~ s/\n.+$//; # Remove the last line
$content =~ s/^\Q$prefix_padding\E //gm; # Remove the padding
$content =~ s{^(\s*)(.+)\Q$hash_separator}{$1<span class="key">$2</span> =&gt; }gm;
if ($censored) {
$content
Expand Down
1 change: 1 addition & 0 deletions share/skel/public/css/error.css
Expand Up @@ -41,6 +41,7 @@ pre.content {
border: 1px solid #aaa;
border-top: 0;
margin-bottom: 1em;
overflow-x: auto;
}

div.title {
Expand Down

0 comments on commit 0396832

Please sign in to comment.