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]
|
||||
}
|
||||
}
|
||||
|
||||
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,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user