Add condition for common markdown.
This commit is contained in:
parent
80e3c8cc3a
commit
e1f43095ea
1 changed files with 11 additions and 6 deletions
|
@ -46,7 +46,8 @@ for my $d (@data) {
|
||||||
my %info;
|
my %info;
|
||||||
my $content;
|
my $content;
|
||||||
open my $file, "< :encoding(UTF-8)", $d;
|
open my $file, "< :encoding(UTF-8)", $d;
|
||||||
<$file>;
|
my $line = <$file>;
|
||||||
|
if ( $line eq '---' ) {
|
||||||
while (<$file>) {
|
while (<$file>) {
|
||||||
chomp;
|
chomp;
|
||||||
if (/^([^:]+):\s+(.+)/) {
|
if (/^([^:]+):\s+(.+)/) {
|
||||||
|
@ -54,6 +55,10 @@ for my $d (@data) {
|
||||||
}
|
}
|
||||||
last if /---/;
|
last if /---/;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$content = $line;
|
||||||
|
}
|
||||||
while (<$file>) {
|
while (<$file>) {
|
||||||
$content .= $_;
|
$content .= $_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue