diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2022-07-08 17:41:18 +0900 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2022-07-09 15:29:44 +1200 |
commit | 9e1882c4920bdafb599948f57a1d9dc65c24083d (patch) | |
tree | 76ea8b01ecdfabd9f7b6d9d8c4e3b2a97151e6c2 | |
parent | 3400fb5cd925915a677aa3a26b8db07130bd4b16 (diff) | |
download | rack-9e1882c4920bdafb599948f57a1d9dc65c24083d.tar.gz |
Use "pre" format and monospace font for exception messages
Ruby 3.1's error_highlight feature prints a code snippet with a underline. To make it readable, an exception message should be rendered by a monospace font and in "pre" format, i.e., whitespaces are preserved and newlines are respected.
-rw-r--r-- | lib/rack/show_exceptions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/show_exceptions.rb b/lib/rack/show_exceptions.rb index 5f2bd7fb..6af1ec1f 100644 --- a/lib/rack/show_exceptions.rb +++ b/lib/rack/show_exceptions.rb @@ -163,7 +163,7 @@ module Rack div.commands { margin-left: 40px; } div.commands a { color:black; text-decoration:none; } #summary { background: #ffc; } - #summary h2 { font-weight: normal; color: #666; } + #summary h2 { font-family: monospace; font-weight: normal; color: #666; white-space: pre; } #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; } #summary ul#quicklinks li { float: left; padding: 0 1em; } #summary ul#quicklinks>li+li { border-left: 1px #666 solid; } |