logo       
Google Custom Search
    AddThis Social Bookmark Button

bagder: curl-www/docs faqparse.pl,1.1,1.2: msg#00082

Subject: bagder: curl-www/docs faqparse.pl,1.1,1.2
Update of /cvsroot/curl/curl-www/docs
In directory labb.contactor.se:/var/tmp/cvs-serv17471

Modified Files:
        faqparse.pl 
Log Message:
better parsing


Index: faqparse.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/docs/faqparse.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- faqparse.pl 10 Aug 2004 12:45:19 -0000      1.1
+++ faqparse.pl 12 Aug 2004 11:44:13 -0000      1.2
@@ -53,13 +53,13 @@
     elsif($state == 3) {
         my $l = $_;
 
-        if($secs[$sec] && ($_ =~ /[0-9]\. $secs[$sec]/i)) {
+        if($secs[$sec] && ($_ =~ /^\s*[0-9]\. $secs[$sec]/i)) {
             # a new section
             subtitle($l);
             $sec++;
         }
 
-        elsif($toc[$q] && ($_ =~ /$toc[$q]/i)) {
+        elsif($toc[$q] && ($_ =~ /^\s*$toc[$q]/i)) {
             # a question
             print "<a name=\"$toc[$q]\"></a><b>$_</b><br>";
             $q++;

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>