about summary refs log tree commit homepage
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 20:22:45 +0000
commit1f1dd03147b2537bb641fed3ac31986f65defefd (patch)
tree95fb4ba185b1b98e31b269f21839052da3db35b2
parent24d67d4f20decf06e73764ac53b68d16f06c8f12 (diff)
downloadpublic-inbox-1f1dd03147b2537bb641fed3ac31986f65defefd.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.
-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);