Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5564 from code-october/fix/html-code
Browse files Browse the repository at this point in the history
fix quoteEnd extract regex
  • Loading branch information
lloydzhou authored Sep 30, 2024
2 parents fcba50f + f5ad51a commit 0c697e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function tryWrapHtmlCode(text: string) {
},
)
.replace(
/(<\/body>)([\r\n\s]*?)(<\/html>)([\n\r]*?)([`]*?)([\n\r]*?)/g,
/(<\/body>)([\r\n\s]*?)(<\/html>)([\n\r]*)([`]*)([\n\r]*?)/g,
(match, bodyEnd, space, htmlEnd, newLine, quoteEnd) => {
return !quoteEnd ? bodyEnd + space + htmlEnd + "\n```\n" : match;
},
Expand Down

0 comments on commit 0c697e1

Please sign in to comment.