🎨 块操作 API 支持使用 <u><kbd> 插入对应行级元素 Fix https://github.com/siyuan-note/siyuan/issues/6039

This commit is contained in:
Liang Ding 2022-10-01 21:41:59 +08:00
parent 45b26e1f3f
commit c5f8a838a3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View file

@ -290,6 +290,8 @@ func broadcastTransactions(transactions []*model.Transaction) {
}
func dataBlockDOM(data string, luteEngine *lute.Lute) (ret string) {
luteEngine.SetHTMLTag2TextMark(true) // API `/api/block/**` 无法使用 `<u>foo</u>` 与 `<kbd>bar</kbd>` 插入/更新行内元素 https://github.com/siyuan-note/siyuan/issues/6039
ret = luteEngine.Md2BlockDOM(data)
if "" == ret {
// 使用 API 插入空字符串出现错误 https://github.com/siyuan-note/siyuan/issues/3931

View file

@ -6,7 +6,7 @@ require (
github.com/88250/clipboard v0.1.5
github.com/88250/css v0.1.2
github.com/88250/gulu v1.2.3-0.20220929123404-da1dc91c9343
github.com/88250/lute v1.7.5-0.20221001045738-06a8c2407d65
github.com/88250/lute v1.7.5-0.20221001133424-66dae26ccb51
github.com/88250/pdfcpu v0.3.13
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732

View file

@ -17,10 +17,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5 h1:8HdZozCsXS
github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20220929123404-da1dc91c9343 h1:GJxJRZmA8GkAiU3GswwsSszKqp1/aywhpyFJ+aC7J+k=
github.com/88250/gulu v1.2.3-0.20220929123404-da1dc91c9343/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
github.com/88250/lute v1.7.5-0.20220928025238-bda91cbd4072 h1:0d7YXGtw2ybeGs6oClIFiKvTqySfJCu5SUdJJWil6MA=
github.com/88250/lute v1.7.5-0.20220928025238-bda91cbd4072/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/lute v1.7.5-0.20221001045738-06a8c2407d65 h1:EyxFJkB2DXZrAzSaMPZhSs72NzEdsn4YNh/zmqat8IY=
github.com/88250/lute v1.7.5-0.20221001045738-06a8c2407d65/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/lute v1.7.5-0.20221001133424-66dae26ccb51 h1:W3AfReSddAgkojmibncSHf01tm76nMcd11zivyj+ZIs=
github.com/88250/lute v1.7.5-0.20221001133424-66dae26ccb51/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=