/[Perly]/lib/Perly/SyntaxHighlight.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Perly/SyntaxHighlight.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 45 by dpavlin, Sun Jun 8 17:15:14 2008 UTC revision 46 by dpavlin, Sun Jun 8 18:34:21 2008 UTC
# Line 58  sub color { Line 58  sub color {
58          my $self = shift;          my $self = shift;
59          my $html = $formatter->format_string( shift );          my $html = $formatter->format_string( shift );
60    
61            $html =~ s/[\n\r]+$//s;
62    
63          # we use CSS white-space: pre, and yet we have to insert <br>s into html          # we use CSS white-space: pre, and yet we have to insert <br>s into html
64          # because copy/paste would squash code in single line          # because copy/paste would squash code in single line
65          $html =~ s!\r?\n!\n<br/>!gs;          $html =~ s!\r?\n!\n<br/>!gs;

Legend:
Removed from v.45  
changed lines
  Added in v.46

  ViewVC Help
Powered by ViewVC 1.1.26