mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 16:52:38 +00:00
Fix regeression in snippets
This commit is contained in:
@@ -4,7 +4,7 @@ import request from '../client/homebrew/utils/request-middleware.js';
|
||||
|
||||
// Convert the templates from a brew to a Snippets Structure.
|
||||
const brewSnippetsToJSON = (menuTitle, userBrewSnippets, themeBundleSnippets=null, full=true)=>{
|
||||
const textSplit = /^\\snippet /gm;
|
||||
const textSplit = /^\\snippet +/gm;
|
||||
const mpAsSnippets = [];
|
||||
// Snippets from Themes first.
|
||||
if(themeBundleSnippets) {
|
||||
@@ -15,7 +15,7 @@ const brewSnippetsToJSON = (menuTitle, userBrewSnippets, themeBundleSnippets=nul
|
||||
const name = snips.trim().split('\n')[0];
|
||||
if(name.length != 0) {
|
||||
userSnippets.push({
|
||||
name : name.slice('\snippets'.length),
|
||||
name : name,
|
||||
icon : '',
|
||||
gen : snips.slice(name.length + 1).trim(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user