Spaces:
Sleeping
Sleeping
Update templates/chat.html
Browse files- templates/chat.html +2 -2
templates/chat.html
CHANGED
@@ -551,11 +551,11 @@
|
|
551 |
const englishRegex = /[0-9]+(?:\.[0-9]+)?/g;
|
552 |
|
553 |
// Wrap English text and numbers in <span dir="ltr">
|
554 |
-
formatted_answer = answer.replace(englishRegex, function(match) {
|
555 |
return `<span class="special-span px-1" dir="ltr">${match}</span>`;
|
556 |
});
|
557 |
|
558 |
-
|
559 |
|
560 |
if (lastElement.hasClass("response-block")) {
|
561 |
$(".chat-container .chat-block:last-child").find(".message-content").html(formatted_answer);
|
|
|
551 |
const englishRegex = /[0-9]+(?:\.[0-9]+)?/g;
|
552 |
|
553 |
// Wrap English text and numbers in <span dir="ltr">
|
554 |
+
let formatted_answer = answer.replace(englishRegex, function(match) {
|
555 |
return `<span class="special-span px-1" dir="ltr">${match}</span>`;
|
556 |
});
|
557 |
|
558 |
+
formatted_answer = addLtrAttribute(formatted_answer);
|
559 |
|
560 |
if (lastElement.hasClass("response-block")) {
|
561 |
$(".chat-container .chat-block:last-child").find(".message-content").html(formatted_answer);
|