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 $content;
|
||||
open my $file, "< :encoding(UTF-8)", $d;
|
||||
<$file>;
|
||||
my $line = <$file>;
|
||||
if ( $line eq '---' ) {
|
||||
while (<$file>) {
|
||||
chomp;
|
||||
if (/^([^:]+):\s+(.+)/) {
|
||||
|
@ -54,6 +55,10 @@ for my $d (@data) {
|
|||
}
|
||||
last if /---/;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$content = $line;
|
||||
}
|
||||
while (<$file>) {
|
||||
$content .= $_;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue