Skip to content

Commit

Permalink
fix: πŸ› correct handle yaml example-format for default values
Browse files Browse the repository at this point in the history
Render defaults as yaml when using --example-format yaml adobe#246

βœ… Closes: adobe#246
  • Loading branch information
anisite committed Mar 24, 2023
1 parent 398b0f9 commit 722e8b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/markdownBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,7 @@ export default function build({
paragraph(code('yaml', yaml.dump(schema[keyword`default`], undefined, 2))),
];
}

if (schema[keyword`default`] && exampleFormat === 'json') {
if (schema[keyword`default`] && exampleFormat === 'json') {
return [
heading(level + 1, text(i18n`${simpletitle(schema)} Default Value`)),
paragraph(text(i18n`The default value is:`)),
Expand Down

0 comments on commit 722e8b6

Please sign in to comment.