/[Frey]/trunk/lib/Frey/Shell/Grep.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 /trunk/lib/Frey/Shell/Grep.pm

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

revision 731 by dpavlin, Thu Dec 4 17:35:11 2008 UTC revision 732 by dpavlin, Sat Dec 6 00:26:12 2008 UTC
# Line 65  sub { Line 65  sub {
65  });  });
66    
67  sub as_markup {  sub as_markup {
68          my ($self) = @_;          my $self = shift;
69            my $callback = {@_};
70    
71          my $patt = $self->pattern;          my $patt = $self->pattern;
72          $self->title( $patt );          $self->title( $patt );
# Line 101  sub as_markup { Line 102  sub as_markup {
102                          if ( $path ne $last_path ) {                          if ( $path ne $last_path ) {
103                                  $html .= qq|<dt class="p">$path</dt>|;                                  $html .= qq|<dt class="p">$path</dt>|;
104                          }                          }
105                          $text =~ s{(\Q$patt\E)}{<b>$1</b>};                          if ( my $dd = $callback->{dd} ) {
106                          $html .= qq|<dd><a target="editor" href="/editor+$path+$line">$line</a> <code>$text</code>|;                                  $html .= $dd->( $patt, $path, $line, $text );
107                            } else {
108                                    $text =~ s{(\Q$patt\E)}{<b>$1</b>};
109                                    $html .= qq|<dd><a target="editor" href="/editor+$path+$line">$line</a> <code>$text</code>|;
110                            }
111                          $last_path = $path;                          $last_path = $path;
112                  } else {                  } else {
113                          $html .= qq|<dt>$text</dt>|;                          $html .= qq|<dt>$text</dt>|;

Legend:
Removed from v.731  
changed lines
  Added in v.732

  ViewVC Help
Powered by ViewVC 1.1.26