about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-20 12:18:35 +0000
committerEric Wong <e@80x24.org>2019-01-20 12:18:35 +0000
commitc57a650986b86891855f0caf720d953142a0c381 (patch)
tree95fb4ba185b1b98e31b269f21839052da3db35b2 /lib
parent26031fa99b0d32db78f3ae77eaf480c03f7cfaac (diff)
downloadpublic-inbox-c57a650986b86891855f0caf720d953142a0c381.tar.gz
We need to keep line-numbers from <a> tags synced to the actual
line numbers in the code when working in smaller viewports.

Maybe I only work on reasonable projects, but excessively
long lines seem to be less of a problem in code than they are
in emails.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ViewVCS.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index 61f4deba..4a3896d4 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -100,7 +100,8 @@ sub show ($$;$) {
                         sprintf("<a id=n$_ href=#n$_>% ${pad}u</a>\n", $_)
                 } (1..$nl)) . '</pre></td>' .
                 '<td><pre> </pre></td>'. # pad for non-CSS users
-                "<td\nclass=lines><pre><code>" .  ascii_html($$blob) .
+                "<td\nclass=lines><pre\nstyle='white-space:pre'><code>" .
+                ascii_html($$blob) .
                 '</code></pre></td></tr></table>' . $log;
 
         html_page($ctx, 200, \$log);