Skip to content

Commit

Permalink
Resolve highlight issues
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Mar 9, 2020
1 parent 3905655 commit bd75a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
)

var Version = "0.5.0 alpha"
var Version = "0.7.0 alpha"

// Clean up the input to avoid searching for spaces etc...
// Take the string cut it up, lower case everything except
Expand Down
2 changes: 1 addition & 1 deletion string/highlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func HighlightString(content string, locations [][]int, in string, out string) s
// This deals with characters that are multi-byte and as such we never range over
// the rest and as such we need to remember to close them off if we have gone past
// their end. As such this needs to come before we write the current byte
if i > end {
if end > 0 && i > end {
str.WriteString(out)
end = 0
}
Expand Down

0 comments on commit bd75a19

Please sign in to comment.