Merged
Conversation
- Extract URL to link conversion into separate function for better maintainability - Simplify pasteAsLink by removing multi-line handling and using single logic - Move URL auto-conversion check before pasteAsLink for proper processing order
Remove convertUrlsToLinks function and improve pasteAsLink to handle text segments more efficiently. The new implementation processes text and links separately while maintaining whitespace and only converts valid URLs to links.
Member
|
在块中复制这一行会丢失粗体, |
Member
Author
|
感觉要处理这个第二种情况,要去改 protyle.lute.Md2BlockDOM 比较好,我在上游改一下这个 case 吧,还是要从 markdown ast 去处理才行 |
Member
Author
|
依赖上游 PR: 88250/lute#226 |
88250
added a commit
that referenced
this pull request
Apr 2, 2026
Signed-off-by: Daniel <845765@qq.com>
Member
|
最新的 lute 已经合并到 dev 分支了。 |
Add new method Md2BlockDOMWithAutoLink to Lute interface and implement auto URL conversion based on editor configuration. This addresses the feature request for automatically converting pasted URLs to links.
… conversion Simplify link handling during paste by leveraging lute's built-in auto link conversion functionality instead of maintaining a separate implementation. This change improves maintainability and reduces code duplication.
Member
Author
|
@Vanessa219 麻烦再看看,基于 lute 的转换表现的很好: |
Ensure link conversion is applied to the correct processed content by moving it after HTML unescaping
uuhan
pushed a commit
to uuhan/siyuan
that referenced
this pull request
Apr 3, 2026
Signed-off-by: Daniel <845765@qq.com>
Vanessa219
reviewed
Apr 3, 2026
The conditional logic for auto-link conversion during paste was incorrectly applied. The code previously skipped auto-link conversion for block types, but the condition was reversed. Since block types should not have auto-link conversion, the condition has been removed entirely to align with the intended behavior.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adjust paste link logic
Description / 描述
修复粘贴多个 link 时不生效的问题
Type of change / 变更类型
缺陷修复
代码重构
新功能
修改文案或增加新语言
Checklist / 检查清单
我对自己的代码进行了自我审查
我拥有所提交代码的完整权利,并同意其以本项目的 AGPL-3.0 许可证授权
devbranch and has no merge conflictsPR 提交到
dev分支,并且没有合并冲突