mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 桌面端支持搜索图片中的文本 Fix https://github.com/siyuan-note/siyuan/issues/3470
This commit is contained in:
parent
db810d6a4b
commit
b13eb03453
1 changed files with 1 additions and 2 deletions
|
|
@ -113,8 +113,7 @@ func NodeStaticContent(node *ast.Node, excludeTypes []string) string {
|
|||
if nil != n.Parent && ast.NodeImage == n.Parent.Type {
|
||||
destNode := n.Parent.ChildByType(ast.NodeLinkDest)
|
||||
if nil != destNode {
|
||||
// 桌面端支持搜索图片中的文本 https://github.com/siyuan-note/siyuan/issues/3470
|
||||
// 尝试 OCR 识别图片中的文字并作为图片的 alt
|
||||
// 桌面端支持搜索图片 OCR 文本 https://github.com/siyuan-note/siyuan/issues/3470
|
||||
if text := util2.Tesseract(filepath.Join(util2.DataDir, destNode.TokensStr())); "" != text {
|
||||
buf.WriteByte(' ')
|
||||
buf.WriteString(text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue