Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 链接被错误解析 #5152

Open
jiajiaxd opened this issue Dec 23, 2024 · 2 comments
Open

[Bug] 链接被错误解析 #5152

jiajiaxd opened this issue Dec 23, 2024 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@jiajiaxd
Copy link

📦 Environment

Docker

📌 Version

v1.37.1

💻 Operating System

Windows

🌐 Browser

Chrome

🐛 Bug Description

image
如图,链接后面不属于链接的部分也被一并解析为链接

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@jiajiaxd jiajiaxd added the 🐛 Bug Something isn't working | 缺陷 label Dec 23, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Dec 23, 2024
@lobehubbot
Copy link
Member

👀 @jiajiaxd

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Dec 23, 2024

@jiajiaxd 你好!我是Dosu,一个可以帮你解决问题、回答疑问、并成为贡献者的机器人。我会在这里帮助你,直到有人类维护者出现。期待与你合作!🤖

The issue you're experiencing seems to be related to the link parsing functionality in the lobe-chat codebase. The link parsing is implemented in the src/components/mdx/Link.tsx file, where it uses a regular expression to determine if a link is external. This might be causing the problem where non-link text is being incorrectly parsed as part of the link [1].

To address this, you might want to review the regular expression used for link detection and ensure it accurately distinguishes between actual links and surrounding text. Adjusting the regex or adding additional logic to handle edge cases could help resolve the issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants