From 1ed48d4975632fc1b29d74fb87c87c36640daf8b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Aug 2002 09:02:48 +0000 Subject: basic slash treatment and URL-linking added git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1779 a1c6a512-1295-4272-9138-f99709370657 --- www/txt2plain.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'www/txt2plain.pl') diff --git a/www/txt2plain.pl b/www/txt2plain.pl index eb630acad0..f460cff301 100755 --- a/www/txt2plain.pl +++ b/www/txt2plain.pl @@ -5,7 +5,11 @@ while() { $_ =~ s/\/>/g; - $_ =~ s/^$/\ /g; + $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^).])/\$1\<\/a\>/g; + + $_ =~ s/^$/\ /g; # empty lines are nbsp + $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line + print $_; } -- cgit v1.2.3