0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 08:58:11 +00:00

Update custom snippets to allow inline

Removes the additional line after a snippet, so it doesn't effectively create a `\n` at the end of the snippet.  This allows snippets to be inline with text.
This commit is contained in:
Gazook89
2026-02-22 21:46:42 -06:00
parent 6374b09dcc
commit f8683ebbc8

View File

@@ -19,7 +19,7 @@ const brewSnippetsToJSON = (menuTitle, userBrewSnippets, themeBundleSnippets=nul
userSnippets.push({ userSnippets.push({
name : snippetName, name : snippetName,
icon : '', icon : '',
gen : snipSplit[snips + 1], gen : snipSplit[snips + 1].replace(/\n$/, ''),
}); });
} }
} }
@@ -44,7 +44,7 @@ const brewSnippetsToJSON = (menuTitle, userBrewSnippets, themeBundleSnippets=nul
if(snippetName.length != 0) { if(snippetName.length != 0) {
const subSnip = { const subSnip = {
name : snippetName, name : snippetName,
gen : snipSplit[snips + 1], gen : snipSplit[snips + 1].replace(/\n$/, ''),
}; };
// if(full) subSnip.icon = ''; // if(full) subSnip.icon = '';
userSnippets.push(subSnip); userSnippets.push(subSnip);