1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-23 05:39:03 +08:00

fix entity parse

This commit is contained in:
zu1k 2021-08-03 08:31:27 +08:00
parent 692ff30b0b
commit 644df4c729

View File

@ -56,10 +56,9 @@ func ParseLine(line string) Entities {
idx = e.Loc[1]
}
}
if len(es) == 0 {
if total := len(line); idx < total {
es = append(es, &Entity{
Loc: []int{0, len(line)},
Loc: []int{idx, total},
Type: TypePlain,
Text: line,
})