Skip to content

Commit

Permalink
Merge pull request #72 from aws/dogusata/mynah-ui-parse-paragraph-as-…
Browse files Browse the repository at this point in the history
…code-block

fixed paragraphs being converted to code blocks for user inputs
  • Loading branch information
dogusata authored Jul 10, 2024
2 parents de6a417 + 6a6bc52 commit d39f8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/chat-item/chat-prompt-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class ChatPromptInput {
const attachmentContent: string | undefined = this.promptAttachment?.lastAttachmentContent;
const promptText = currentInputValue + (attachmentContent ?? '');
const context: string[] = [];
const escapedPrompt = escapeHTML(promptText.replace(/@\S*/gi, (match) => {
const escapedPrompt = escapeHTML(promptText.replace(/^\s+/gm, '').replace(/@\S*/gi, (match) => {
if (!context.includes(match)) {
context.push(match);
}
Expand Down

0 comments on commit d39f8c0

Please sign in to comment.