Skip to content

Commit

Permalink
fix entity parse
Browse files Browse the repository at this point in the history
  • Loading branch information
zu1k committed Aug 3, 2021
1 parent 692ff30 commit 644df4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/entity/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down

0 comments on commit 644df4c

Please sign in to comment.