From b834d900dd3c760f5ec03bc309289e8fcf57b544 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 20 Jul 2023 22:06:51 +0200 Subject: [PATCH] html2txt Links when target equal text --- lib/perl/NB/Functions.pm | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.3