Skip to content

Commit

Permalink
sanitize backticks to solve #218
Browse files Browse the repository at this point in the history
  • Loading branch information
swyxio committed Sep 6, 2023
1 parent 5fbbc59 commit 5d05f9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export default function Layout() {
enabledProviders.forEach((provider) => {
// Call provider-specific CSS handling and custom paste setup
try {
provider.handleInput(superprompt);
// regex to sanitize superprompt from backticks since we will put it into a template string
// solves https://github.com/smol-ai/GodMode/issues/218
provider.handleInput(superprompt.replace(/`/g, '\\`'));
} catch (err) {
console.error('error settling ' + provider.paneId(), err);
}
Expand Down

0 comments on commit 5d05f9c

Please sign in to comment.