From 7f35ce53a0183aafc450faded89954f784bf835a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 22 Dec 2014 01:37:58 +0000 Subject: Documentation/txt2pre: support #fragments and ftp:// Occasionally we'll use these for links. --- Documentation/txt2pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/txt2pre b/Documentation/txt2pre index f84f9c06..0384a1d0 100755 --- a/Documentation/txt2pre +++ b/Documentation/txt2pre @@ -17,7 +17,7 @@ my ($title) = ($str =~ /\A([^\n]+)/); # temporarily swap > for escape so our s!! to add href works. # there's probably a way to do this with only a single s!! ... $str =~ s!>!\e!g; -$str =~ s!\b(https?://[\w+\+\&\?\.\%\;/-]+)!$1!g; +$str =~ s!\b((ftp|https?)://[\w+\+\&\?\.\%\;/#-]+)!$1!g; $str =~ s!\e!>!g; # swap escapes back to > print '', -- cgit v1.2.3-24-ge0c7