0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 11:02:38 +00:00

Fix regeression in snippets

This commit is contained in:
David Bolack
2025-03-14 18:36:18 -05:00
parent ab6c1ae402
commit b605346c7d
4 changed files with 2 additions and 5 deletions

View File

@@ -469,7 +469,6 @@ const EditPage = createClass({
renderer={this.state.brew.renderer}
userThemes={this.props.userThemes}
themeBundle={this.state.themeBundle}
snippetBundle={this.state.themeBundle.snippets}
updateBrew={this.updateBrew}
onCursorPageChange={this.handleEditorCursorPageChange}
onViewPageChange={this.handleEditorViewPageChange}

View File

@@ -108,7 +108,6 @@ const HomePage = createClass({
onTextChange={this.handleTextChange}
renderer={this.state.brew.renderer}
showEditButtons={false}
snippets={this.props.snippets}
themeBundle={this.state.themeBundle}
onCursorPageChange={this.handleEditorCursorPageChange}
onViewPageChange={this.handleEditorViewPageChange}

View File

@@ -246,7 +246,6 @@ const NewPage = createClass({
onSnipChange={this.handleSnipChange}
renderer={this.state.brew.renderer}
userThemes={this.props.userThemes}
snippets={this.props.snippets}
themeBundle={this.state.themeBundle}
onCursorPageChange={this.handleEditorCursorPageChange}
onViewPageChange={this.handleEditorViewPageChange}

View File

@@ -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(),
});