User: sits    
  Date: 08/06/17 04:51:00

  Modified:    lib/Codestriker/Http DeltaRenderer.pm
               .        codestriker.conf
  Log:
  If the highlighter is not defined, fallback to the old-style Codestriker html 
formatting.
  
  
  
  Index: DeltaRenderer.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Http/DeltaRenderer.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DeltaRenderer.pm  17 Jun 2008 11:09:34 -0000      1.8
  +++ DeltaRenderer.pm  17 Jun 2008 11:50:59 -0000      1.9
  @@ -52,20 +52,21 @@
       $self->{comment_locations} = [EMAIL PROTECTED];
       $self->{comment_location_map} = \%comment_location_map;
   
  -    # Record list of line filter objects to apply to each line of code.
  -    # Setup some default filters.
  -    my $lxr_config = defined $repository ?
  -             $Codestriker::lxr_map->{$repository->toString()} : undef;
  -    
  +    # If the highlighter has been configured, use that for converting the
  +    # code to html.
       @{$self->{line_filters}} = ();
  -    push @{$self->{line_filters}}, 
Codestriker::Http::HighlightLineFilter->new($Codestriker::highlight);
  -    
  -    #push @{$self->{line_filters}}, 
Codestriker::Http::HtmlEntityLineFilter->new();
  -    #push @{$self->{line_filters}}, 
Codestriker::Http::TabToNbspLineFilter->new($tabwidth);
  -    #push @{$self->{line_filters}}, 
Codestriker::Http::LineBreakLineFilter->new($brmode);
  -    #if (defined $lxr_config) {
  -     #    push @{$self->{line_filters}}, 
Codestriker::Http::LxrLineFilter->new($lxr_config);
  -    #}
  +    if (defined $Codestriker::highlighter && $Codestriker::highlighter ne 
'') {
  +         push @{$self->{line_filters}}, 
Codestriker::Http::HighlightLineFilter->new($Codestriker::highlighter);
  +    } else {
  +     push @{$self->{line_filters}}, 
Codestriker::Http::HtmlEntityLineFilter->new();
  +     push @{$self->{line_filters}}, 
Codestriker::Http::TabToNbspLineFilter->new($tabwidth);
  +     push @{$self->{line_filters}}, 
Codestriker::Http::LineBreakLineFilter->new($brmode);
  +         my $lxr_config = defined $repository ?
  +                     $Codestriker::lxr_map->{$repository->toString()} : 
undef;
  +     if (defined $lxr_config) {
  +                 push @{$self->{line_filters}}, 
Codestriker::Http::LxrLineFilter->new($lxr_config);
  +     }
  +    }
   
       bless $self, $type;
   }
  
  
  
  
  
  Index: codestriker.conf
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- codestriker.conf  17 Jun 2008 11:09:35 -0000      1.93
  +++ codestriker.conf  17 Jun 2008 11:50:59 -0000      1.94
  @@ -77,8 +77,10 @@
   $vss = 'C:/Program Files/Microsoft Visual Studio/VSS/win32/ss.exe';
   
   # Location of the highlight binary, which is used for highlighting source 
code.
  -# Available from  http://www.andre-simon.de/.
  -$highlight = 'C:/Program Files/WinHighlight/highlight.exe'; 
  +# Available from  http://www.andre-simon.de/.  If this is not set, no syntax
  +# highlighting will be performed.
  +$highlighter = '';
  +#$highlighter = 'C:/Program Files/WinHighlight/highlight.exe'; 
   
   # Temporary directory Codestriker can use.  For *NIX platforms, this will
   # /tmp by default, for Windows 2000 c:\winnt\temp and for XP, 
c:\windows\temp.
  
  
  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to