This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
correctly handle C<< >> and C<<< >>> in diagnostics
authorYitzchak Scott-Thoennes <sthoenna@efn.org>
Tue, 25 May 2004 02:29:37 +0000 (19:29 -0700)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 26 May 2004 08:15:29 +0000 (08:15 +0000)
Message-ID: <20040525092937.GA2332@efn.org>

p4raw-id: //depot/perl@22848

lib/diagnostics.pm

index 7445aad..26ff013 100755 (executable)
@@ -314,10 +314,10 @@ my %msg;
            sub noop   { return $_[0] }  # spensive for a noop
            sub bold   { my $str =$_[0];  $str =~ s/(.)/$1\b$1/g; return $str; } 
            sub italic { my $str = $_[0]; $str =~ s/(.)/_\b$1/g;  return $str; } 
            sub noop   { return $_[0] }  # spensive for a noop
            sub bold   { my $str =$_[0];  $str =~ s/(.)/$1\b$1/g; return $str; } 
            sub italic { my $str = $_[0]; $str =~ s/(.)/_\b$1/g;  return $str; } 
-           s/[BC]<(.*?)>/bold($1)/ges;
+           s/C<<< (.*?) >>>|C<< (.*?) >>|[BC]<(.*?)>/bold($+)/ges;
            s/[LIF]<(.*?)>/italic($1)/ges;
        } else {
            s/[LIF]<(.*?)>/italic($1)/ges;
        } else {
-           s/[BC]<(.*?)>/$1/gs;
+           s/C<<< (.*?) >>>|C<< (.*?) >>|[BC]<(.*?)>/$+/gs;
            s/[LIF]<(.*?)>/$1/gs;
        } 
        unless (/^=/) {
            s/[LIF]<(.*?)>/$1/gs;
        } 
        unless (/^=/) {