mirror of
https://github.com/siyuan-note/siyuan
synced 2026-04-21 13:37:52 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4926ba156a
10 changed files with 16 additions and 12 deletions
|
|
@ -18,6 +18,7 @@ Below are the detailed changes in this version.
|
|||
* [Improve cursor positioning after Undo in tables](https://github.com/siyuan-note/siyuan/issues/17532)
|
||||
* [Optimize code block line number rendering for better performance](https://github.com/siyuan-note/siyuan/issues/17542)
|
||||
* [Improve data indexing](https://github.com/siyuan-note/siyuan/issues/17543)
|
||||
* [Improve the clipping extension to resolve issues where images were too large to be clipped](https://github.com/siyuan-note/siyuan/issues/17547)
|
||||
|
||||
### Bugfix
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
* [改進表格中撤銷後的遊標定位](https://github.com/siyuan-note/siyuan/issues/17532)
|
||||
* [最佳化程式碼區塊行號渲染以提升效能](https://github.com/siyuan-note/siyuan/issues/17542)
|
||||
* [改進資料索引](https://github.com/siyuan-note/siyuan/issues/17543)
|
||||
* [改進剪藏擴充解決圖片過大無法剪藏](https://github.com/siyuan-note/siyuan/issues/17547)
|
||||
|
||||
### 修復缺陷
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
* [改进表格中撤销后的光标定位](https://github.com/siyuan-note/siyuan/issues/17532)
|
||||
* [优化代码块行号渲染以提升性能](https://github.com/siyuan-note/siyuan/issues/17542)
|
||||
* [改进数据索引](https://github.com/siyuan-note/siyuan/issues/17543)
|
||||
* [改进剪藏扩展解决图片过大无法剪藏](https://github.com/siyuan-note/siyuan/issues/17547)
|
||||
|
||||
### 修复缺陷
|
||||
|
||||
|
|
|
|||
|
|
@ -1357,7 +1357,7 @@ class="b3-list-item b3-list-item--hide-action" data-path="${item.path}">
|
|||
<span class="b3-list-item__icon b3-tooltips b3-tooltips__n popover__block${editingPublishAccess ? " fn__none" : ""}" data-id="${item.id}" aria-label="${window.siyuan.languages.changeIcon}">${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder))}</span>
|
||||
<span class="b3-list-item__switch b3-tooltips b3-tooltips__n${editingPublishAccess ? "" : " fn__none"}" aria-label="${window.siyuan.languages.publishAccess}">${getPublishAccessOptionByLevel("public").iconHTML}</span>
|
||||
<span class="b3-list-item__text ariaLabel" data-position="parentE"
|
||||
aria-label="${ariaLabel}">${getDisplayName(item.name, true, true)}</span>
|
||||
aria-label="${ariaLabel}">${getDisplayName(Lute.EscapeHTMLStr(item.name), true, true)}</span>
|
||||
<span data-type="more-file" class="b3-list-item__action b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.more}">
|
||||
<svg><use xlink:href="#iconMore"></use></svg>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -802,7 +802,7 @@ class="b3-list-item" data-path="${item.path}">
|
|||
</span>
|
||||
<span class="b3-list-item__icon"${editingPublishAccess ? " fn__none" : ""}>${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder))}</span>
|
||||
<span class="b3-list-item__switch${editingPublishAccess ? "" : " fn__none"}">${getPublishAccessOptionByLevel("public").iconHTML}</span>
|
||||
<span class="b3-list-item__text">${getDisplayName(item.name, true, true)}</span>
|
||||
<span class="b3-list-item__text">${getDisplayName(Lute.EscapeHTMLStr(item.name), true, true)}</span>
|
||||
<span data-type="more-file" class="b3-list-item__action b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.more}">
|
||||
<svg><use xlink:href="#iconMore"></use></svg>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
|
|||
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
|
||||
</span>
|
||||
${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder), "b3-list-item__graphic", true)}
|
||||
<span class="b3-list-item__text ariaLabel" data-position="parentE" aria-label="${getDisplayName(item.name, true, true)} <small class='ft__on-surface'>${item.hSize}</small>${item.bookmark ? "<br>" + window.siyuan.languages.bookmark + " " + item.bookmark : ""}${item.name1 ? "<br>" + window.siyuan.languages.name + " " + item.name1 : ""}${item.alias ? "<br>" + window.siyuan.languages.alias + " " + item.alias : ""}${item.memo ? "<br>" + window.siyuan.languages.memo + " " + item.memo : ""}${item.subFileCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", item.subFileCount) : ""}<br>${window.siyuan.languages.modifiedAt} ${item.hMtime}<br>${window.siyuan.languages.createdAt} ${item.hCtime}">${getDisplayName(item.name, true, true)}</span>
|
||||
<span class="b3-list-item__text ariaLabel" data-position="parentE" aria-label="${getDisplayName(Lute.EscapeHTMLStr(item.name), true, true)} <small class='ft__on-surface'>${item.hSize}</small>${item.bookmark ? "<br>" + window.siyuan.languages.bookmark + " " + item.bookmark : ""}${item.name1 ? "<br>" + window.siyuan.languages.name + " " + item.name1 : ""}${item.alias ? "<br>" + window.siyuan.languages.alias + " " + item.alias : ""}${item.memo ? "<br>" + window.siyuan.languages.memo + " " + item.memo : ""}${item.subFileCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", item.subFileCount) : ""}<br>${window.siyuan.languages.modifiedAt} ${item.hMtime}<br>${window.siyuan.languages.createdAt} ${item.hCtime}">${getDisplayName(item.name, true, true)}</span>
|
||||
${countHTML}
|
||||
</li>`;
|
||||
});
|
||||
|
|
|
|||
7
kernel/cache/ial.go
vendored
7
kernel/cache/ial.go
vendored
|
|
@ -17,9 +17,8 @@
|
|||
package cache
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"maps"
|
||||
|
||||
"github.com/88250/lute/editor"
|
||||
"github.com/dgraph-io/ristretto"
|
||||
)
|
||||
|
||||
|
|
@ -40,9 +39,7 @@ func GetDocIAL(p string) (ret map[string]string) {
|
|||
}
|
||||
|
||||
ret = map[string]string{}
|
||||
for k, v := range ial.(map[string]string) {
|
||||
ret[k] = strings.ReplaceAll(v, editor.IALValEscNewLine, "\n")
|
||||
}
|
||||
maps.Copy(ret, ial.(map[string]string))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *p
|
|||
if "" == title {
|
||||
title = "Untitled"
|
||||
}
|
||||
hPathBuilder.WriteString(util.UnescapeHTML(title))
|
||||
hPathBuilder.WriteString(title)
|
||||
hPathBuilder.WriteString("/")
|
||||
}
|
||||
hPathBuilder.WriteString(ret.Root.IALAttr("title"))
|
||||
|
|
@ -228,6 +228,10 @@ func DocIAL(absPath string) (ret map[string]string) {
|
|||
}
|
||||
file.Close()
|
||||
filelock.Unlock(absPath)
|
||||
|
||||
for k, v := range ret {
|
||||
ret[k] = html.UnescapeAttrVal(v)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +390,7 @@ func removeUnescapedUnicodeNull(data []byte) []byte {
|
|||
}
|
||||
|
||||
func afterWriteTree(tree *parse.Tree) {
|
||||
docIAL := parse.IAL2MapUnEsc(tree.Root.KramdownIAL)
|
||||
docIAL := parse.IAL2Map(tree.Root.KramdownIAL)
|
||||
cache.PutDocIAL(tree.Path, docIAL)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ func (box *Box) docFromFileInfo(fileInfo *FileInfo, ial map[string]string) (ret
|
|||
ret = &File{}
|
||||
ret.Path = fileInfo.path
|
||||
ret.Size = uint64(fileInfo.size)
|
||||
ret.Name = ial["title"] + ".sy"
|
||||
ret.Name = ial["title"]
|
||||
ret.Icon = ial["icon"]
|
||||
ret.ID = ial["id"]
|
||||
ret.Name1 = ial["name"]
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ func indexBox(boxID string) {
|
|||
return
|
||||
}
|
||||
|
||||
docIAL := parse.IAL2MapUnEsc(tree.Root.KramdownIAL)
|
||||
docIAL := parse.IAL2Map(tree.Root.KramdownIAL)
|
||||
if "" == docIAL["updated"] { // 早期的数据可能没有 updated 属性,这里进行订正
|
||||
updated := util.TimeFromID(tree.Root.ID)
|
||||
tree.Root.SetIALAttr("updated", updated)
|
||||
|
|
|
|||
Loading…
Reference in a new issue