Skip to content

Commit

Permalink
Fix markdown format (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Seagull authored Feb 22, 2024
1 parent 2e3186b commit 2f4e6a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ class ChatSidebarViewProvider implements vscode.WebviewViewProvider {
question: message.content,
}),
}
).then((response) => response.text());
)
.then((response) => response.text())
// Trim triple backticks
.then((text) => {
console.log("Received response:", text);
return text.replace(/^`{3}[a-zA-Z]*/, "").replace(/`{3}$/, "");
});
sendMessage(response);
} catch (error) {
const parsedError = error as Error;
Expand Down

0 comments on commit 2f4e6a9

Please sign in to comment.