bagder: curl-www/docs faqparse.pl,1.11,1.12

[email protected] Fri, 18 Mar 2011 10:56:27 +0000
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/docs
In directory giant.haxx.se:/var/tmp/cvs-serv6095

Modified Files:
	faqparse.pl 
Log Message:
linkify <pre> sections too


Index: faqparse.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/docs/faqparse.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- faqparse.pl	14 Mar 2011 12:30:53 -0000	1.11
+++ faqparse.pl	18 Mar 2011 10:56:25 -0000	1.12
@@ -103,6 +103,8 @@
             # Emphasize _underlined_ words
             s/\b_([[:alnum:]]+)_\b/<em>$1<\/em>/g;
 
+            # linkify URLs
+            s/((http|ftp):\/\/([\w.\/%-?]*[a-z0-9\/]))/<a href=\"$2:\/\/$3\">$1<\/a>/g;
             if($_ =~ /^     /) {
                 # five or more initial spaces, use <pre>
                 push @pre, $_;
@@ -114,7 +116,6 @@
                     print "</pre>\n";
                     undef @pre;
                 }
-                s/((http|ftp):\/\/([\w.\/%-?]*[a-z0-9\/]))/<a href=\"$2:\/\/$3\">$1<\/a>/g;
                 
                 # prevent many blanks
                 my $show = $_;