diff --git a/app/changelogs/v2.11.3/v2.11.3.md b/app/changelogs/v2.11.3/v2.11.3.md new file mode 100644 index 000000000..d83d38b2d --- /dev/null +++ b/app/changelogs/v2.11.3/v2.11.3.md @@ -0,0 +1,44 @@ +## Overview + +This version of search and replace supports selecting element types. For example, you can only replace content in plain text without replacing formula content. + +Advertisement: The `PRO Features` early bird price will end in early January 2024. If you want to purchase, please hurry up. For details, please [visit](https://b3log.org/siyuan/en/pricing.html). + +Note: The annual `Subscription` includes `PRO Features`. If you are an annual subscriber, you do not need to buy PRO Features separately. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [Doc cover link input support displays the value](https://github.com/siyuan-note/siyuan/issues/9850) +* [Enable or disable all CSS and JS code snippets](https://github.com/siyuan-note/siyuan/issues/9860) +* [Delete the corresponding data in the database attributes table after deleting the doc](https://github.com/siyuan-note/siyuan/issues/9875) +* [Support using `Space` and `Enter` for spaced repetition `Good` scoring](https://github.com/siyuan-note/siyuan/issues/9878) +* [Completes the missing move up button on mobile](https://github.com/siyuan-note/siyuan/issues/9882) +* [Breadcrumbs cannot display "_" on Windows](https://github.com/siyuan-note/siyuan/issues/9893) +* [Find replace supports selecting element types](https://github.com/siyuan-note/siyuan/issues/9895) +* [Improve web page clip code block content conversion](https://github.com/siyuan-note/siyuan/issues/9896) +* [Add template func `pow`, `powf`, `log` and `logf`](https://github.com/siyuan-note/siyuan/issues/9911) + +### Bugfix + +* [`Close all tabs at startup` is invalid on the PC browser when the mobile APP network serving](https://github.com/siyuan-note/siyuan/issues/9855) +* [Carriage return parsing exception when paragraph contains blank lines](https://github.com/siyuan-note/siyuan/issues/9868) +* [Create doc failed on non-Windows](https://github.com/siyuan-note/siyuan/issues/9890) +* [Remove or add block causes editor to scroll](https://github.com/siyuan-note/siyuan/issues/9891) +* [Drag to form a super block, then drag again and the content disappears](https://github.com/siyuan-note/siyuan/issues/9900) + +### Development + +* [Reduce database table view editing latency](https://github.com/siyuan-note/siyuan/issues/9306) +* [Improve save layout](https://github.com/siyuan-note/siyuan/issues/9866) +* [Add internal kernel API `/api/block/getTailChildBlocks`](https://github.com/siyuan-note/siyuan/issues/9884) +* [Support copy, cut, paste and delete when database table view cell is selected](https://github.com/siyuan-note/siyuan/issues/9886) +* [Database table view template columns support reference date columns](https://github.com/siyuan-note/siyuan/issues/9887) +* [Support modifying the primary key value of the binding block](https://github.com/siyuan-note/siyuan/issues/9892) +* [Automatically fill in the filter result value when adding rows in the database table view](https://github.com/siyuan-note/siyuan/issues/9905) +* [Add internal kernel API `/api/setting/addVirtualBlockRefInclude` and `addVirtualBlockRefExclude`](https://github.com/siyuan-note/siyuan/issues/9909) +* [Add push event `setConf` on WebSocket channel `main`](https://github.com/siyuan-note/siyuan/issues/9910) +* [Improve database table view template column sorting](https://github.com/siyuan-note/siyuan/issues/9914) diff --git a/app/changelogs/v2.11.3/v2.11.3_zh_CHT.md b/app/changelogs/v2.11.3/v2.11.3_zh_CHT.md new file mode 100644 index 000000000..92cfd760f --- /dev/null +++ b/app/changelogs/v2.11.3/v2.11.3_zh_CHT.md @@ -0,0 +1,44 @@ +## 概述 + +此版本搜尋取代支援選擇元素類型,例如可以僅取代純文字中的內容而不取代公式內容。 + +廣告: `功能特性` 早鳥價將於 2024 年 1 月初結束,如需購買請抓緊時間,細節請[訪問](https://b3log.org/siyuan/pricing.html)。 + +註:`年付訂閱` 包含 `功能特性`,如果你是訂閱會員,則無需單獨購買功能特性。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [文件題頭圖支援顯示連結網址](https://github.com/siyuan-note/siyuan/issues/9850) +* [支援啟用或停用所有 CSS 和 JS 程式碼片段](https://github.com/siyuan-note/siyuan/issues/9860) +* [刪除文件後刪除資料庫 attributes 表格對應資料](https://github.com/siyuan-note/siyuan/issues/9875) +* [閃卡間隔重複時支援使用 `Space` 和 `Enter` 進行 `良好` 評分](https://github.com/siyuan-note/siyuan/issues/9878) +* [行動端補全缺失的上移按鈕](https://github.com/siyuan-note/siyuan/issues/9882) +* [麵包屑在 Windows 上無法顯示 "_"](https://github.com/siyuan-note/siyuan/issues/9893) +* [搜尋替換支援選擇元素類型](https://github.com/siyuan-note/siyuan/issues/9895) +* [改進網頁剪藏程式碼區塊轉換](https://github.com/siyuan-note/siyuan/issues/9896) +* [新增範本函數 `pow`, `powf`、`log` 和 `logf`](https://github.com/siyuan-note/siyuan/issues/9911) + +### 修復缺陷 + +* [`啟動時關閉所有頁籤` 在 APP 伺服桌面端瀏覽器訪問時失效](https://github.com/siyuan-note/siyuan/issues/9855) +* [段落包含空白行時回車解析異常](https://github.com/siyuan-note/siyuan/issues/9868) +* [在非 Windows 端建立文件異常](https://github.com/siyuan-note/siyuan/issues/9890) +* [刪除或新增區塊導致編輯器滾動](https://github.com/siyuan-note/siyuan/issues/9891) +* [從超級區塊拖曳後再次拖曳內容消失](https://github.com/siyuan-note/siyuan/issues/9900) + +### 開發者 + +* [降低資料庫表格檢視編輯延遲](https://github.com/siyuan-note/siyuan/issues/9306) +* [改良版面配置機制](https://github.com/siyuan-note/siyuan/issues/9866) +* [新增內部核心 API `/api/block/getTailChildBlocks`](https://github.com/siyuan-note/siyuan/issues/9884) +* [資料庫表格檢視儲存格選擇後支援複製、剪下、貼上和刪除](https://github.com/siyuan-note/siyuan/issues/9886) +* [資料庫表格檢視範本列支援引用日期列](https://github.com/siyuan-note/siyuan/issues/9887) +* [資料庫表格視圖主鍵列支援修改綁定區塊](https://github.com/siyuan-note/siyuan/issues/9892) +* [資料庫表格檢視新增行時自動填入篩選結果值](https://github.com/siyuan-note/siyuan/issues/9905) +* [新增內部核心 API `/api/setting/addVirtualBlockRefInclude` and `addVirtualBlockRefExclude`](https://github.com/siyuan-note/siyuan/issues/9909) +* [新增 WebSocket 通道 `main` 推送事件 `setConf`](https://github.com/siyuan-note/siyuan/issues/9910) +* [改進資料庫表格視圖範本列排序](https://github.com/siyuan-note/siyuan/issues/9914) \ No newline at end of file diff --git a/app/changelogs/v2.11.3/v2.11.3_zh_CN.md b/app/changelogs/v2.11.3/v2.11.3_zh_CN.md new file mode 100644 index 000000000..6d9e6a297 --- /dev/null +++ b/app/changelogs/v2.11.3/v2.11.3_zh_CN.md @@ -0,0 +1,44 @@ +## 概述 + +该版本搜索替换支持选择元素类型,比如可以仅替换纯文本中的内容而不替换公式内容。 + +广告: `功能特性` 早鸟价将于 2024 年 1 月初结束,如需购买请抓紧时间,细节请[访问](https://b3log.org/siyuan/pricing.html)。 + +注:`年付订阅` 包含 `功能特性`,如果你是订阅会员,则无需单独购买功能特性。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [文档题头图支持显示链接地址](https://github.com/siyuan-note/siyuan/issues/9850) +* [支持启用或禁用所有 CSS 和 JS 代码片段](https://github.com/siyuan-note/siyuan/issues/9860) +* [删除文档后删除数据库 attributes 表对应数据](https://github.com/siyuan-note/siyuan/issues/9875) +* [闪卡间隔重复时支持使用 `Space` 和 `Enter` 进行 `良好` 评分](https://github.com/siyuan-note/siyuan/issues/9878) +* [移动端补全缺失的上移按钮](https://github.com/siyuan-note/siyuan/issues/9882) +* [面包屑在 Windows 上无法显示 "_"](https://github.com/siyuan-note/siyuan/issues/9893) +* [搜索替换支持选择元素类型](https://github.com/siyuan-note/siyuan/issues/9895) +* [改进网页剪藏代码块转换](https://github.com/siyuan-note/siyuan/issues/9896) +* [添加模板函数 `pow`, `powf`、`log` 和 `logf`](https://github.com/siyuan-note/siyuan/issues/9911) + +### 修复缺陷 + +* [`启动时关闭所有页签` 在 APP 伺服桌面端浏览器访问时失效](https://github.com/siyuan-note/siyuan/issues/9855) +* [段落包含空白行时回车解析异常](https://github.com/siyuan-note/siyuan/issues/9868) +* [在非 Windows 端创建文档异常](https://github.com/siyuan-note/siyuan/issues/9890) +* [删除或添加块导致编辑器滚动](https://github.com/siyuan-note/siyuan/issues/9891) +* [从超级块中拖拽后再次拖拽内容消失](https://github.com/siyuan-note/siyuan/issues/9900) + +### 开发者 + +* [降低数据库表格视图编辑延迟](https://github.com/siyuan-note/siyuan/issues/9306) +* [改进布局保存机制](https://github.com/siyuan-note/siyuan/issues/9866) +* [添加内部内核 API `/api/block/getTailChildBlocks`](https://github.com/siyuan-note/siyuan/issues/9884) +* [数据库表格视图单元格选择后支持复制、剪切、粘贴和删除](https://github.com/siyuan-note/siyuan/issues/9886) +* [数据库表格视图模板列支持引用日期列](https://github.com/siyuan-note/siyuan/issues/9887) +* [数据库表格视图主键列支持修改绑定块](https://github.com/siyuan-note/siyuan/issues/9892) +* [数据库表格视图添加行时自动填入过滤结果值](https://github.com/siyuan-note/siyuan/issues/9905) +* [添加内部内核 API `/api/setting/addVirtualBlockRefInclude` and `addVirtualBlockRefExclude`](https://github.com/siyuan-note/siyuan/issues/9909) +* [添加 WebSocket 通道 `main` 推送事件 `setConf`](https://github.com/siyuan-note/siyuan/issues/9910) +* [改进数据库表格视图模板列排序](https://github.com/siyuan-note/siyuan/issues/9914) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 63e8dc22c..ca1c2b629 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -1880,10 +1880,6 @@ func bindBlockAv(tx *Transaction, avID, blockID string) { attrs[av.NodeAttrNameAvs] = avID } else { avIDs := strings.Split(attrs[av.NodeAttrNameAvs], ",") - if gulu.Str.Contains(avID, avIDs) { - return - } - avIDs = append(avIDs, avID) avIDs = gulu.Str.RemoveDuplicatedElem(avIDs) attrs[av.NodeAttrNameAvs] = strings.Join(avIDs, ",")