format fixes
This commit is contained in:
parent
978a4d17cf
commit
a4b6688433
|
@ -39,13 +39,13 @@ for(my $i=1;$i<=$count;$i++) {
|
|||
# hashtags are converted to links
|
||||
# <a href="https://mastodon.social/tags/framagit" class="mention hashtag" rel="tag">#<span>framagit</span></a>
|
||||
|
||||
$text=~s@<a href=\"[^\"]+\" class=\"mention hashtag\" rel=\"tag\">#<span>(.*)</span></a>@#$1@g;
|
||||
$text=~s@<a href=\"[^\"]+\" class=\"mention hashtag\" rel=\"tag\">#<span>(.*)</span></a>@ #$1@g;
|
||||
|
||||
if ($text=~m@(<a .*</a>)@) {
|
||||
my $a_tag=$1;
|
||||
if($a_tag =~ m@href=\"([^\"]+)\"@) {
|
||||
my $url=$1;
|
||||
substr($text, index($text, $a_tag), length($a_tag))="\n => $url\n";
|
||||
substr($text, index($text, $a_tag), length($a_tag))="\n=> $url\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,10 @@ for(my $i=1;$i<=$count;$i++) {
|
|||
$media =~ s@.*/@@;
|
||||
$media="=> $media\n";
|
||||
}
|
||||
|
||||
$post{$filedate} || ($post{$filedate}="# $filedate\n");
|
||||
|
||||
$post{$filedate}.="# $date
|
||||
$post{$filedate}.="## $date
|
||||
$text
|
||||
$media
|
||||
";
|
||||
|
|
Loading…
Reference in New Issue