瀏覽代碼

: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

Daniel 2 年之前
父節點
當前提交
82fa9f58b2
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      kernel/bazaar/package.go

+ 1 - 2
kernel/bazaar/package.go

@@ -524,8 +524,7 @@ func renderREADME(repoURL string, mdData []byte) (ret string, err error) {
 	}
 	}
 
 
 	doc.Find("a").Each(func(i int, selection *goquery.Selection) {
 	doc.Find("a").Each(func(i int, selection *goquery.Selection) {
-		href, ok := selection.Attr("href")
-		if ok {
+		if href, ok := selection.Attr("href"); ok {
 			if util.IsRelativePath(href) {
 			if util.IsRelativePath(href) {
 				selection.SetAttr("href", linkBase+href)
 				selection.SetAttr("href", linkBase+href)
 			}
 			}