From: Mischa POSLAWSKY Date: Sat, 21 Apr 2018 16:44:49 +0000 (+0200) Subject: chars: query overflow error as debug message X-Git-Tag: v1.12~79 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/44d15e0fc5019df2eedf7a46d977ee681ca41675 chars: query overflow error as debug message Resulting match can be very long as well, so hide it for users. Allow error messages to be force wrapped to fit. --- diff --git a/base.css b/base.css index 8703c83..cd09f2d 100644 --- a/base.css +++ b/base.css @@ -101,8 +101,10 @@ ul { } pre { - display: inline-block; text-align: left; + margin: 2ex auto; + white-space: pre-wrap; + overflow-wrap: break-word; } body > pre { width: 78ch; @@ -111,6 +113,7 @@ body > pre { padding: 0 1em; border-width: 0 1px; border-style: solid; + white-space: pre; } h2 small { diff --git a/chars.plp b/chars.plp index 6605ec8..bea56cf 100644 --- a/chars.plp +++ b/chars.plp @@ -89,8 +89,8 @@ for (map { split /[^\d-]/ } $query) { @chars or Abort("No match for query $query", '404 no results'); @chars <= 1500 or Abort( - sprintf('Too many matches (%d) for query %s', scalar @chars, $query), - '403 not allowed', + sprintf('Too many matches (%d) for query', scalar @chars), + '403 not allowed', $query ); # output character list