From c0eae1c55c0d48ed1c6f9f6cb2d8990deb163b37 Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 19 Aug 2024 16:13:44 +0800 Subject: [PATCH] refactor: webui render error (#797) --- assets/arena.html | 3 ++- assets/playground.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/arena.html b/assets/arena.html index 90cc6af..80e1397 100644 --- a/assets/arena.html +++ b/assets/arena.html @@ -121,6 +121,7 @@ .chat-message-content .error { color: red; + background: none; } .chat-message-content .message-text { @@ -1028,7 +1029,7 @@ } function renderMarkdown(text, error = '') { - return marked.marked(text) + (error ? `

${error}

` : ''); + return marked.marked(text) + (error ? `
${error}
` : ''); } function calculateOffsets(pieces) { diff --git a/assets/playground.html b/assets/playground.html index 011d632..1c1c294 100644 --- a/assets/playground.html +++ b/assets/playground.html @@ -198,6 +198,7 @@ .chat-message-content .error { color: red; + background: none; } .chat-message-content .message-text { @@ -1251,7 +1252,7 @@ } function renderMarkdown(text, error = '') { - return marked.marked(text) + (error ? `

${error}

` : ''); + return marked.marked(text) + (error ? `
${error}
` : ''); }