Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8d59fb002e
12 changed files with 48 additions and 13 deletions
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "Card status",
|
||||
"noSupportTip": "This function does not support the use of card decks",
|
||||
"insertRowTip": "The newly added rows have been filtered and can be viewed by canceling filtering/searching/sorting",
|
||||
"insertRowTip2": "New rows do not participate in sorting",
|
||||
"insertPhoto": "Take a photo and insert it",
|
||||
"relativeToToday": "Relative to today",
|
||||
"current": "This",
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "Estado de la tarjeta",
|
||||
"noSupportTip": "Esta función no admite el uso de paquetes de tarjetas",
|
||||
"insertRowTip": "Las filas recién agregadas se han filtrado y se pueden ver cancelando el filtrado/búsqueda/clasificación",
|
||||
"insertRowTip2": "Las filas nuevas no participan en la clasificación",
|
||||
"insertPhoto": "Toma una foto e insértala",
|
||||
"relativeToToday": "Relativa a hoy",
|
||||
"current": "Esto",
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "Statut de la carte",
|
||||
"noSupportTip": "Cette fonction ne prend pas en charge l'utilisation de packages de cartes",
|
||||
"insertRowTip": "Les lignes nouvellement ajoutées ont été filtrées et peuvent être visualisées en annulant le filtrage/recherche/tri",
|
||||
"insertRowTip2": "Les nouvelles lignes ne participent pas au tri",
|
||||
"insertPhoto": "Prendre une photo et l'insérer",
|
||||
"relativeToToday": "Par rapport à aujourd'hui",
|
||||
"current": "Ceci",
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "カードの状態",
|
||||
"noSupportTip": "この機能はカードデッキの使用をサポートしていません",
|
||||
"insertRowTip": "新しく追加された行はフィルタリングされており、フィルタリング/検索/並べ替えを解除すると表示されます",
|
||||
"insertRowTip2": "新しく追加された行は並べ替えの対象ではありません",
|
||||
"insertPhoto": "画像を挿入",
|
||||
"relativeToToday": "今日からの相対的な期間",
|
||||
"current": "現在",
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "卡片狀態",
|
||||
"noSupportTip": "此功能不支援卡包使用",
|
||||
"insertRowTip": "新增行已被過濾,可取消過濾/搜尋/排序進行查看",
|
||||
"insertRowTip2": "新增行不參與排序",
|
||||
"insertPhoto": "拍照並插入",
|
||||
"relativeToToday": "相對於今天",
|
||||
"current": "當前",
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"cardStatus": "卡片状态",
|
||||
"noSupportTip": "该功能不支持卡包使用",
|
||||
"insertRowTip": "新增行已被过滤,可取消过滤/搜索/排序进行查看",
|
||||
"insertRowTip2": "新增行不参与排序",
|
||||
"insertPhoto": "拍照并插入",
|
||||
"relativeToToday": "相对于今天",
|
||||
"current": "当前",
|
||||
|
|
|
@ -108,7 +108,6 @@ export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: El
|
|||
// 有排序需要加入最后一行
|
||||
if (blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active")) {
|
||||
previousElement = blockElement.querySelector(".av__row--util").previousElementSibling;
|
||||
showMessage(window.siyuan.languages.insertRowTip2);
|
||||
}
|
||||
let colHTML = '<div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;
|
||||
|
|
2
app/stage/protyle/js/lute/lute.min.js
vendored
2
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -33,6 +33,7 @@ import (
|
|||
"github.com/gabriel-vasile/mimetype"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/httpclient"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
@ -121,9 +122,44 @@ func extensionCopy(c *gin.Context) {
|
|||
uploaded[oName] = "assets/" + fName
|
||||
}
|
||||
|
||||
md, withMath, _ := model.HTML2Markdown(dom)
|
||||
md = strings.TrimSpace(md)
|
||||
luteEngine := util.NewLute()
|
||||
var md string
|
||||
var withMath bool
|
||||
if nil != form.Value["href"] {
|
||||
if href := form.Value["href"][0]; strings.HasPrefix(href, "https://ld246.com/article/") || strings.HasPrefix(href, "https://liuyun.io/article/") {
|
||||
// 剪藏链滴帖子时直接使用 Markdown 接口的返回
|
||||
// https://ld246.com/article/raw/1724850322251
|
||||
href = strings.ReplaceAll(href, "https://ld246.com/article/", "https://ld246.com/article/raw/")
|
||||
href = strings.ReplaceAll(href, "https://liuyun.io/article/", "https://liuyun.io/article/raw/")
|
||||
resp, err := httpclient.NewCloudRequest30s().Get(href)
|
||||
if nil != err {
|
||||
logging.LogWarnf("get [%s] failed: %s", href, err)
|
||||
} else {
|
||||
bodyData, readErr := io.ReadAll(resp.Body)
|
||||
if nil != readErr {
|
||||
ret.Code = -1
|
||||
ret.Msg = "read response body failed: " + readErr.Error()
|
||||
return
|
||||
}
|
||||
|
||||
md = string(bodyData)
|
||||
tree := parse.Parse("", []byte(md), luteEngine.ParseOptions)
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if ast.NodeInlineMath == n.Type {
|
||||
withMath = true
|
||||
return ast.WalkStop
|
||||
}
|
||||
return ast.WalkContinue
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if "" == md {
|
||||
md, withMath, _ = model.HTML2Markdown(dom)
|
||||
}
|
||||
|
||||
md = strings.TrimSpace(md)
|
||||
if withMath {
|
||||
luteEngine.SetInlineMath(true)
|
||||
}
|
||||
|
@ -142,6 +178,9 @@ func extensionCopy(c *gin.Context) {
|
|||
} else if ast.NodeImage == n.Type {
|
||||
if dest := n.ChildByType(ast.NodeLinkDest); nil != dest {
|
||||
assetPath := uploaded[string(dest.Tokens)]
|
||||
if "" == assetPath {
|
||||
assetPath = uploaded[string(dest.Tokens)+"?imageView2/2/interlace/1/format/webp"]
|
||||
}
|
||||
if "" != assetPath {
|
||||
dest.Tokens = []byte(assetPath)
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ require (
|
|||
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
|
||||
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02
|
||||
github.com/88250/lute v1.7.7-0.20240815090409-42ad4c5920e9
|
||||
github.com/88250/lute v1.7.7-0.20240831130630-35ae4ccc832e
|
||||
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
|
||||
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
|
||||
|
|
|
@ -12,8 +12,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
|
|||
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02 h1:3e5+yobj655pTeKOYMbJrnc1mE51ZkbXIxquTYZuYCY=
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
|
||||
github.com/88250/lute v1.7.7-0.20240815090409-42ad4c5920e9 h1:GJMM6/2sRb+wjkLmdXhaW/Z6TPYwou5fdFZV5euYS94=
|
||||
github.com/88250/lute v1.7.7-0.20240815090409-42ad4c5920e9/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
|
||||
github.com/88250/lute v1.7.7-0.20240831130630-35ae4ccc832e h1:wFEOMaoERk9vuEFcjSt82f7I0SW4qQozDihuMjUpA80=
|
||||
github.com/88250/lute v1.7.7-0.20240831130630-35ae4ccc832e/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
|
||||
|
|
|
@ -3037,6 +3037,9 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
|
|||
if !val.IsDetached { // 现在绑定了块
|
||||
// 将游离行绑定到新建的块上
|
||||
bindBlockAv(tx, avID, rowID)
|
||||
if nil != val.Block {
|
||||
val.BlockID = val.Block.ID
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 之前绑定了块
|
||||
|
|
Loading…
Add table
Reference in a new issue