mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Clean code https://github.com/siyuan-note/siyuan/pull/15087
This commit is contained in:
parent
f0d49acdea
commit
13e618075b
1 changed files with 0 additions and 3 deletions
|
|
@ -62,10 +62,8 @@ func extensionCopy(c *gin.Context) {
|
||||||
|
|
||||||
clippingSym := false
|
clippingSym := false
|
||||||
symArticleHref := ""
|
symArticleHref := ""
|
||||||
|
|
||||||
hasHref := nil != form.Value["href"]
|
hasHref := nil != form.Value["href"]
|
||||||
isPartClip := nil != form.Value["clipType"] && form.Value["clipType"][0] == "part"
|
isPartClip := nil != form.Value["clipType"] && form.Value["clipType"][0] == "part"
|
||||||
|
|
||||||
if hasHref && !isPartClip {
|
if hasHref && !isPartClip {
|
||||||
// 剪藏链滴帖子时直接使用 Markdown 接口的返回
|
// 剪藏链滴帖子时直接使用 Markdown 接口的返回
|
||||||
// https://ld246.com/article/raw/1724850322251
|
// https://ld246.com/article/raw/1724850322251
|
||||||
|
|
@ -82,7 +80,6 @@ func extensionCopy(c *gin.Context) {
|
||||||
|
|
||||||
if "" != baseURL {
|
if "" != baseURL {
|
||||||
articleID := strings.TrimPrefix(symArticleHref, originalPrefix)
|
articleID := strings.TrimPrefix(symArticleHref, originalPrefix)
|
||||||
|
|
||||||
if idx := strings.IndexAny(articleID, "/?#"); -1 != idx {
|
if idx := strings.IndexAny(articleID, "/?#"); -1 != idx {
|
||||||
articleID = articleID[:idx]
|
articleID = articleID[:idx]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue