Commit
•
8e370ca
1
Parent(s):
189b280
fixup! ♻️ Simplify / improve token removal
Browse files
src/lib/components/chat/ChatMessage.svelte
CHANGED
@@ -10,6 +10,8 @@
|
|
10 |
function sanitizeMd(md: string) {
|
11 |
return md
|
12 |
.replace(/<\|[a-z]*$/, "")
|
|
|
|
|
13 |
.replaceAll(/<\|[a-z]+\|>/g, " ")
|
14 |
.trim()
|
15 |
.replaceAll("&", "&")
|
|
|
10 |
function sanitizeMd(md: string) {
|
11 |
return md
|
12 |
.replace(/<\|[a-z]*$/, "")
|
13 |
+
.replace(/<\|[a-z]+\|$/, "")
|
14 |
+
.replace(/<$/, "")
|
15 |
.replaceAll(/<\|[a-z]+\|>/g, " ")
|
16 |
.trim()
|
17 |
.replaceAll("&", "&")
|