We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fc561a commit e867d6fCopy full SHA for e867d6f
lib/Locale/Po4a/YamlFrontMatter.pm
@@ -82,8 +82,12 @@ sub parse_yaml_front_matter {
82
my @saved_ctn;
83
my ( $nextline, $nextref ) = $self->shiftline();
84
push @saved_ctn, ( $nextline, $nextref );
85
+ my $last_line;
86
while ( defined($nextline) ) {
- last if ( $nextline =~ /^(---|\.\.\.)$/ );
87
+ if ( $nextline =~ /^(---|\.\.\.)$/ ) {
88
+ $last_line = $nextline;
89
+ last;
90
+ }
91
$yfm .= $nextline;
92
( $nextline, $nextref ) = $self->shiftline();
93
if ( $nextline =~ /: [\[\{]/ ) {
@@ -147,7 +151,7 @@ sub parse_yaml_front_matter {
147
151
$self->{options}{yfm_skip_array},
148
152
$self->{options}{yfm_paths}
149
153
);
150
- $self->pushline("---\n");
154
+ $self->pushline($last_line);
155
return 1; # Valid YAML
156
}
157
0 commit comments