[Bps-public-commit] r17429 - in Net-Google-Code/trunk: lib/Net/Google/Code

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Dec 30 04:52:53 EST 2008


Author: sunnavy
Date: Tue Dec 30 04:52:52 2008
New Revision: 17429

Modified:
   Net-Google-Code/trunk/   (props changed)
   Net-Google-Code/trunk/lib/Net/Google/Code/Ticket.pm
   Net-Google-Code/trunk/lib/Net/Google/Code/TicketComment.pm

Log:
 r18352 at sunnavys-mb:  sunnavy | 2008-12-30 15:48:07 +0800
 leave the last \n; trim \r


Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Ticket.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Ticket.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Ticket.pm	Tue Dec 30 04:52:52 2008
@@ -59,7 +59,8 @@
       ->content_array_ref->[0];
     my $text = $description->find_by_tag_name('pre')->as_text;
     $text =~ s/^\s+//;
-    $text =~ s/\s+$//;
+    $text =~ s/\s+$/\n/;
+    $text =~ s/\r\n/\n/g;
     $self->state->{description} = $text;
     # TODO extract attachments if there are some
 

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/TicketComment.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/TicketComment.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/TicketComment.pm	Tue Dec 30 04:52:52 2008
@@ -39,7 +39,8 @@
     $self->date( $element->look_down( class => 'date' )->attr_get_i('title') );
     my $content = $element->find_by_tag_name('pre')->as_text;
     $content =~ s/^\s+//;
-    $content =~ s/\s+$//;
+    $content =~ s/\s+$/\n/;
+    $content =~ s/\r\n/\n/g;
     $self->content( $content );
 # TODO parse prop_change
 # TODO parse attachments



More information about the Bps-public-commit mailing list