Skip to content

Commit 827e2b3

Browse files
authored
Merge pull request #801 from hydephp/update-converts-array-to-front-matter-action
Update ConvertsArrayToFrontMatter to support passing flags to dumper
2 parents f8c53e0 + 840c1df commit 827e2b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/framework/src/Framework/Actions/ConvertsArrayToFrontMatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class ConvertsArrayToFrontMatter
1818
*
1919
* @return string $yaml front matter
2020
*/
21-
public function execute(array $array): string
21+
public function execute(array $array, int $flags = 0): string
2222
{
2323
if (empty($array)) {
2424
return '';
2525
}
2626

27-
return "---\n".Yaml::dump($array)."---\n";
27+
return "---\n".Yaml::dump($array, flags: $flags)."---\n";
2828
}
2929
}

0 commit comments

Comments
 (0)