Show
Ignore:
Timestamp:
05/11/08 17:04:41 (4 years ago)
Author:
dom
Message:

fix much tab/whitespace damage; no functional changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Formatter/WikiLinkFormatterParent.pm

    r349 r431  
    4040    my ($self, $from, $to, $content) = @_; 
    4141 
    42         # If we support extended (square bracket) links, update those 
    43         if($self->{_extended_links}) { 
    44                 $content =~ s/\[$from\]/\[$to\]/g; 
    45                 $content =~ s/\[$from(\s*|.*?)\]/\[$to$1\]/g; 
    46         } 
     42    # If we support extended (square bracket) links, update those 
     43    if($self->{_extended_links}) { 
     44        $content =~ s/\[$from\]/\[$to\]/g; 
     45        $content =~ s/\[$from(\s*|.*?)\]/\[$to$1\]/g; 
     46    } 
    4747 
    48         # If we support implicit (camelcase) links, update those 
    49         if($self->{_implicit_links}) { 
    50                 $content =~ s/\b$from\b/$to/g; 
    51                 $content =~ s/^$from\b/$to/gm; 
    52                 $content =~ s/\b$from$/$to/gm; 
    53         } 
     48    # If we support implicit (camelcase) links, update those 
     49    if($self->{_implicit_links}) { 
     50        $content =~ s/\b$from\b/$to/g; 
     51        $content =~ s/^$from\b/$to/gm; 
     52        $content =~ s/\b$from$/$to/gm; 
     53    } 
    5454 
    55         return $content; 
     55    return $content; 
    5656} 
    5757 
     
    7272 
    7373    my $foo = wikiformat($raw, 
    74                         { link => sub { 
    75                                         my ($link, $opts) = @_; 
    76                                         $opts ||= {}; 
    77                                         my $title; 
    78                                         ($link, $title) = split(/\|/, $link, 2) 
    79                                                 if $opts->{extended}; 
    80                                         push @Wiki::Toolkit::Formatter::WikiLinkFormatterParent::_links_found, 
    81                                                 $link; 
    82                                         return ""; # don't care about output 
    83                                 } 
    84                         }, 
    85                         { 
    86                                 extended       => $self->{_extended_links}, 
    87                                 prefix         => $self->{_node_prefix}, 
    88                                 implicit_links => $self->{_implicit_links}  
    89                         }  
    90         ); 
     74            { link => sub { 
     75                    my ($link, $opts) = @_; 
     76                    $opts ||= {}; 
     77                    my $title; 
     78                    ($link, $title) = split(/\|/, $link, 2) 
     79                        if $opts->{extended}; 
     80                    push @Wiki::Toolkit::Formatter::WikiLinkFormatterParent::_links_found, 
     81                        $link; 
     82                    return ""; # don't care about output 
     83                } 
     84            }, 
     85            { 
     86                extended       => $self->{_extended_links}, 
     87                prefix         => $self->{_node_prefix}, 
     88                implicit_links => $self->{_implicit_links}  
     89            }  
     90    ); 
    9191 
    9292    my @links = @_links_found;