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

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.