lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Bedrock / Azure / Mistral / DeepSeek),Knowledge Base(file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
37.47k stars 8.84k forks source link

代码回复时,复制到编辑器格式乱了,都展示在一行 #3175

Open yanpengfei-git opened 1 month ago

yanpengfei-git commented 1 month ago

📦 部署环境

Docker

📌 软件版本

v1.2.14

💻 系统环境

Other Linux

🌐 浏览器

Safari

🐛 问题描述

代码回复时,复制到编辑器格式乱了,都展示在一行

📷 复现步骤

No response

🚦 期望结果

格式保持原有的格式

📝 补充信息

No response

lobehubbot commented 1 month ago

👀 @yanpengfei-git

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

v1.2.14

💻 System environment

Other Linux

🌐 Browser

Safari

🐛 Problem description

When replying to the code, the format is messed up when copied to the editor, and they are all displayed on one line.

📷 Steps to reproduce

No response

🚦 Expected results

Keep the original format

📝 Supplementary information

No response

arvinxx commented 1 month ago

截个图看下

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Take a screenshot to see

anyidea commented 1 month ago

Same issue with Safari

bikekoala commented 1 month ago

lobe

When manually copying code, the formatting becomes messy after pasting.

anyidea commented 1 month ago

any progress?

anyidea commented 1 month ago

通过复制按钮复制的格式是没问题的,选中部分代码复制会换行符丢失问题(使用的是 Safari浏览器, lobechat版本 v1.6.11)

更新: 确认了下 Safari浏览器的问题, 切换 Chrome浏览器没这个问题,希望可以支持下 Safari(版本 17.5)

CleanShot 2024-07-24 at 18 23 54

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There is no problem with the format copied through the copy button. However, if you select part of the code and copy it, the line breaks will be lost.

anyidea commented 1 month ago

@arvinxx 大佬有时间看一下呗

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@arvinxx Boss, please take a look if you have time.

arvinxx commented 1 month ago

@canisminor1990 这个和组件有关吗?还是和组件无关?

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@canisminor1990 Is this related to components? Or does it have nothing to do with components?