/[swish]/trunk/spider/filter.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/spider/filter.pm

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

revision 70 by dpavlin, Thu Mar 18 23:07:21 2004 UTC revision 71 by dpavlin, Sat Apr 3 15:15:36 2004 UTC
# Line 22  sub filter { Line 22  sub filter {
22          # remove comments between <html> and <head> texi2html inserts them          # remove comments between <html> and <head> texi2html inserts them
23          # there and swish can't find document title then (libxml or swish bug?)          # there and swish can't find document title then (libxml or swish bug?)
24          while ($contents =~ s/(<html>.*)<!--.*?-->(.*<head>)/$1$2/msi) { };          while ($contents =~ s/(<html>.*)<!--.*?-->(.*<head>)/$1$2/msi) { };
25            
26            # remove empty lines before/after <html>
27            $contents =~ s/^\s+(<html>)/$1/is;
28            $contents =~ s/(<\/html>)\s+$/$1/is;
29            # remove cr
30            $contents =~ s/\r//gs;
31    
32            # remove SQL Magazine header and footer
33            $contents =~ s/<!-- begin topnav area -->.+?<!-- end topnav area -->/<\/table>/is;
34            $contents =~ s/<!--Begin Footer-->.+?<\/table>/<\/table>/is;
35    
36          # remote TPJ left column          # remote TPJ left column
37          if ($contents =~ s,<!-- BEGIN LEFT SIDE BAR CELL -->.+?<!-- END LEFT SIDE BAR CELL -->,,isg) {          if ($contents =~ s,<!-- BEGIN LEFT SIDE BAR CELL -->.+?<!-- END LEFT SIDE BAR CELL -->,,isg) {

Legend:
Removed from v.70  
changed lines
  Added in v.71

  ViewVC Help
Powered by ViewVC 1.1.26