mirror of
https://github.com/fumiama/emozi.git
synced 2026-06-26 23:10:26 +08:00
optimize(data): 查字
This commit is contained in:
9
data.go
9
data.go
@@ -109,13 +109,12 @@ func (c *Coder) 查字(ch rune, lstbuf []字表) ([]字表, []字表, error) {
|
|||||||
lstbuf = append(lstbuf, x)
|
lstbuf = append(lstbuf, x)
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
|
||||||
c.字表缓存[ch] = nil
|
|
||||||
return nil, lstbuf, err
|
|
||||||
}
|
|
||||||
if len(lstbuf) == 0 {
|
if len(lstbuf) == 0 {
|
||||||
c.字表缓存[ch] = nil
|
c.字表缓存[ch] = nil
|
||||||
return nil, lstbuf, ErrNoSuchChar
|
if err == nil {
|
||||||
|
err = ErrNoSuchChar
|
||||||
|
}
|
||||||
|
return nil, lstbuf, err
|
||||||
}
|
}
|
||||||
lstsave := make([]字表, len(lstbuf))
|
lstsave := make([]字表, len(lstbuf))
|
||||||
copy(lstsave, lstbuf)
|
copy(lstsave, lstbuf)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ var 部首后备 = map[rune]string{
|
|||||||
'品': string(空),
|
'品': string(空),
|
||||||
'龠': string(空),
|
'龠': string(空),
|
||||||
'冊': string(空),
|
'冊': string(空),
|
||||||
'㗊': string(空),
|
'㗊': "💠",
|
||||||
'舌': "👅",
|
'舌': "👅",
|
||||||
'干': string(空),
|
'干': string(空),
|
||||||
'𧮫': string(空),
|
'𧮫': string(空),
|
||||||
|
|||||||
Reference in New Issue
Block a user