diff --git a/Translator/read.pl b/Translator/read.pl index 594a581..d9e453f 100644 --- a/Translator/read.pl +++ b/Translator/read.pl @@ -46,13 +46,18 @@ for my $d (@data) { my %info; my $content; open my $file, "< :encoding(UTF-8)", $d; - <$file>; - while (<$file>) { - chomp; - if (/^([^:]+):\s+(.+)/) { - $info{$1} = $2; + my $line = <$file>; + if ( $line eq '---' ) { + while (<$file>) { + chomp; + if (/^([^:]+):\s+(.+)/) { + $info{$1} = $2; + } + last if /---/; } - last if /---/; + } + else { + $content = $line; } while (<$file>) { $content .= $_;