From: Nicolas Boisselier Date: Thu, 20 Jul 2023 20:06:51 +0000 (+0200) Subject: html2txt Links when target equal text X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=b834d900dd3c760f5ec03bc309289e8fcf57b544;p=nb.git html2txt Links when target equal text --- diff --git a/lib/perl/NB/Functions.pm b/lib/perl/NB/Functions.pm index 8e7c6b64..6636155c 100644 --- a/lib/perl/NB/Functions.pm +++ b/lib/perl/NB/Functions.pm @@ -558,6 +558,9 @@ sub html2txt { ,\n,gix; # Links + $v =~ s, + ]+href="([^"]+)"[^>]*>\g1 + ,$1,gix; # when target equal text $v =~ s, ]+href="([^"]+)"[^>]*>([^<]+) ,$2 ( $1 ),gix;