Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: The hyperlink in the marketplace package README fails to jump to the browser to open Fix https://github.com/siyuan-note/siyuan/issues/8452

Daniel228452b8e2f4
diff --git a/kernel/bazaar/package.go b/kernel/bazaar/package.go
index d16ee3597d..45a41535ef 100644
--- a/kernel/bazaar/package.go
+++ b/kernel/bazaar/package.go
@@ -524,8 +524,14 @@ func renderREADME(repoURL string, mdData []byte) (ret string, err error) {
}
doc.Find("a").Each(func(i int, selection *goquery.Selection) {
- if href, ok := selection.Attr("href"); ok && util.IsRelativePath(href) {
- selection.SetAttr("href", linkBase+href)
+ href, ok := selection.Attr("href")
+ if ok {
+ if util.IsRelativePath(href) {
+ selection.SetAttr("href", linkBase+href)
+ }
+
+ // The hyperlink in the marketplace package README fails to jump to the browser to open https://github.com/siyuan-note/siyuan/issues/8452
+ selection.SetAttr("target", "_blank")
}
})