remove duplicate markdown file
This commit is contained in:
parent
c98cf5fc56
commit
4f84e332ab
1 changed files with 0 additions and 13 deletions
|
|
@ -1,13 +0,0 @@
|
|||
/**
|
||||
* Removes code blocks from a message.
|
||||
*
|
||||
* Return modified message text.
|
||||
*/
|
||||
export function removeCodeBlocksAndTrim(text: string): string {
|
||||
const codeBlockRegex = /```[\s\S]*?```/g;
|
||||
|
||||
// Remove code blocks from the message text
|
||||
const textWithoutCodeBlocks = text.replace(codeBlockRegex, "");
|
||||
|
||||
return textWithoutCodeBlocks.trim();
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue