A little bit of cleanup and structure flattening
Fixes failed tests.
This commit is contained in:
1 parent
9f56d100aa
commit
c6cd6e9864
2 files changed
+5
-3
No files matched your search
@@ -177,7 +177,8 @@ const api = {
|
||||
`${text}`;
|
||||
}
|
||||
const metadata = _.pick(brew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme']);
|
||||
metadata.snippets = brewSnippetsToJSON('brew_snippets', brew.snippets, null, false);
|
||||
const snippetsArray = brewSnippetsToJSON('brew_snippets', brew.snippets, null, false).snippets;
|
||||
metadata.snippets = snippetsArray.length > 0 ? snippetsArray : undefined;
|
||||
text = `\`\`\`metadata\n` +
|
||||
`${yaml.dump(metadata)}\n` +
|
||||
`\`\`\`\n\n` +
|
||||
|
||||
Reference in new issue
Block a user