Remove files changed from incorrect base

This commit is contained in:
David Bolack
2026-10-13 13:10:35 -05:00
parent 34b5b559a7
commit 991655a05f
8 changed files with 37 additions and 90 deletions
+1 -40
View File
@@ -114,44 +114,6 @@ const splitTextStyleAndMetadata = (brew)=>{
if(typeof brew.tags === 'string') brew.tags = brew.tags ? [brew.tags] : [];
};
const transformFrontmatter = (brew, format = 'hb')=>{
const markdownFormats = {
hb : '```metadata',
cm : '---',
toml : '+++',
json : ';;;'
};
let text = brew.text;
if((brew.style !== undefined) && (format == 'hb')) {
text = `\`\`\`css\n` +
`${brew.style || ''}\n` +
`\`\`\`\n\n` +
`${text}`;
}
const metadata = _.pick(brew, ['title', 'description', 'tags']);
if(format == 'hb') {
const snippetsArray = brewSnippetsToJSON('brew_snippets', brew.snippets, null, false).snippets;
metadata.snippets = snippetsArray.length > 0 ? snippetsArray : undefined;
metadata.bleedSize = { top: brew?.bleedSize?.top, bottom: brew?.bleedSize?.bottom, inner: brew?.bleedSize?.inner, outer: brew?.bleedSize?.outer };
metadata.safetySpace = { top: brew?.safetySpace?.top, bottom: brew?.safetySpace?.bottom, outer: brew?.safetySpace?.outer, inner: brew?.safetySpace?.inner };
metadata.trimSize = { width: brew?.trimSize?.width, height: brew?.trimSize?.height };
metadata.columns = brew?.columns;
metadata.columnGutter = brew?.columnGutter;
metadata.license = brew?.license;
metadata.legalAuthors = brew?.legalAuthors;
metadata.renderer = brew.renderer;
metadata.theme = brew.theme;
}
text = `${markdownFormats[format]}\n` +
`${format != 'json' ? yaml.dump(metadata) : JSON.stringify(metadata)}\n` +
`${markdownFormats[format].slice(0, 3)}\n\n` +
`${text}`;
return text;
};
const printCurrentBrew = async ()=>{
if(window.typeof !== 'undefined') {
// fire a custom event for the print cycle
@@ -268,6 +230,5 @@ export {
fetchThemeBundle,
brewSnippetsToJSON,
debugTextMismatch,
yamlSnippetsToText,
transformFrontmatter
yamlSnippetsToText
};