diff --git a/II/T.pm b/II/T.pm index 47e47bf..832afa3 100644 --- a/II/T.pm +++ b/II/T.pm @@ -168,39 +168,17 @@ sub pre { $post =~ s/--/—/g; $post =~ s/.?\*(.+)\*.?/ $1<\/b> /g; - # URI's parsing - if ( $post =~ m!^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?! ) { - - print "\n2:=$2=\n"; - # Images - if ( $9 !=~ m/.+\.(jpg|png|gif)/ ) { - $post - =~ s/(https?:\/\/.+)/$1<\/a>/g; - } - elsif ( $9 =~ m/.+\.((jpg|png|gif)|(JPG|PNG|GIF))/ ) { - $post - =~ s/(https?:\/\/.+\.(jpg|png|gif))/<\/a>/g; - $post - =~ s/(https?:\/\/.+\.(JPG|PNG|GIF))/<\/a>/g; - } - elsif ( $2 eq 'ii' ) { - # ii uri - $post =~ s/ii:\/\/(.+\.\d{1,4}),?.+/$1<\/a>/g; - $post =~ s/ii:\/\/(.{20})/$1<\/a>/g; - } - } + # Images + $post =~ s/\[img (.+)\]/<\/a>/g; + + # ii uri + $post =~ s/ii:\/\/(.+\.\d{1,2,3,4}),?.+/$1<\/a>/g; + $post =~ s/ii:\/\/(.{20})/$1<\/a>/g; $post =~ s/^$/
\n/g; $post =~ s/(.?)\n/$1
\n/g; $post =~ s/\*(.+)/
  • $1<\/li>\n/g; - - # Url - # use Regexp::Common "URI"; - # $post =~ s( ($RE{URI}{HTTP}) ) - # ($1)gx; - - # Not are regexp parsing my $pre = 0; my $txt; @@ -223,6 +201,7 @@ sub pre { return $txt; } +# Footer sub foot { my ($self) = @_;