From 81f762541bb0a36f9cf2996a94d71629fc52f150 Mon Sep 17 00:00:00 2001 From: tateisu Date: Sun, 4 Dec 2022 10:20:48 +0900 Subject: [PATCH] update full_description.pl, recognize html block tags. --- .../metadata/android/en-US/full_description.pl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fastlane/metadata/android/en-US/full_description.pl b/fastlane/metadata/android/en-US/full_description.pl index bec0e3d9..319b9a41 100644 --- a/fastlane/metadata/android/en-US/full_description.pl +++ b/fastlane/metadata/android/en-US/full_description.pl @@ -27,16 +27,15 @@ my $blockElements = join "|", qw( br ); -# Attributes part inside HTML tag. -my $attrsRe = qr!(?:[^>/"]+|"[^"]*")*!; +# block tag it may have attributes, and spaces before/after tag. +my $trimElementsRe = qr!\s*(/"]+|"[^"]*")*/?>)\s*!i; -my $blockElementsRe = qr!(?:$blockElements)!i; -my $trimElementsRe = qr!\s*()\s*!; - -# say $trimElementsRe; -# while( $text =~ /$trimElementsRe/g){ -# say "match: [$&]"; -# } +## verbose debugging. +#say $trimElementsRe; +#while( $text =~ /$trimElementsRe/g){ +# next if $& eq $1; +# say "[$&] => [$1]"; +#} # trim spaces before/after block tags. also
,
,
$text =~ s/$trimElementsRe/$1/g;