mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-22 05:30:19 +09:00
Merge pull request #5564 from code-october/fix/html-code
fix quoteEnd extract regex
This commit is contained in:
commit
0c697e123d
@ -252,7 +252,7 @@ function tryWrapHtmlCode(text: string) {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.replace(
|
.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) => {
|
(match, bodyEnd, space, htmlEnd, newLine, quoteEnd) => {
|
||||||
return !quoteEnd ? bodyEnd + space + htmlEnd + "\n```\n" : match;
|
return !quoteEnd ? bodyEnd + space + htmlEnd + "\n```\n" : match;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user