More dictionary fixes
This commit is contained in:
parent
46031374c5
commit
f725e49217
4
edict.go
4
edict.go
@ -50,11 +50,11 @@ func convertEdictEntry(edictEntry jmdict.JmdictEntry) []termSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, sense := range edictEntry.Sense {
|
for _, sense := range edictEntry.Sense {
|
||||||
if hasString(reading.Reading, sense.RestrictedReadings) {
|
if sense.RestrictedReadings != nil && !hasString(reading.Reading, sense.RestrictedReadings) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if kanji != nil && hasString(kanji.Expression, sense.RestrictedKanji) {
|
if kanji != nil && sense.RestrictedKanji != nil && !hasString(kanji.Expression, sense.RestrictedKanji) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user