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:
parent
692ff30b0b
commit
644df4c729
@ -56,10 +56,9 @@ func ParseLine(line string) Entities {
|
|||||||
idx = e.Loc[1]
|
idx = e.Loc[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if total := len(line); idx < total {
|
||||||
if len(es) == 0 {
|
|
||||||
es = append(es, &Entity{
|
es = append(es, &Entity{
|
||||||
Loc: []int{0, len(line)},
|
Loc: []int{idx, total},
|
||||||
Type: TypePlain,
|
Type: TypePlain,
|
||||||
Text: line,
|
Text: line,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user