Skip to content

Commit

Permalink
fix: 代码块嵌入小代码块时渲染错误
Browse files Browse the repository at this point in the history
  • Loading branch information
OPChips committed Nov 15, 2024
1 parent b08ce56 commit e562165
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ function escapeBrackets(text: string) {

function tryWrapHtmlCode(text: string) {
// try add wrap html code (fixed: html codeblock include 2 newline)
// ignore embed codeblock
if (text.includes("```")) {
return text;
}
return text
.replace(
/([`]*?)(\w*?)([\n\r]*?)(<!DOCTYPE html>)/g,
Expand Down

0 comments on commit e562165

Please sign in to comment.