]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ViewVCS.pm
examples/*.psgi: add examples for -httpd
[public-inbox.git] / lib / PublicInbox / ViewVCS.pm
index 77b3ca2814e104aea306c19e179ceece1167d7ef..2f8e1c4f6531413e8bec34b5929678bdf8f86ab8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # show any VCS object, similar to "git show"
@@ -164,7 +164,7 @@ sub solve_result {
 
        # TODO: detect + convert to ensure validity
        utf8::decode($$blob);
-       my $nl = ($$blob =~ tr/\n/\n/);
+       my $nl = ($$blob =~ s/\r?\n/\n/sg);
        my $pad = length($nl);
 
        $l->linkify_1($$blob);