Simplify highlight_string logic.
Simplify highlight_string logic.

This change avoids some complicated byte arithmetic by
extracting some local variables and being more explicit
about using bytes vs. using strings.

rishig/zulip,zulip/zulip,tommyip/zulip,kou/zulip,tommyip/zulip,kou/zulip,brainwane/zulip,hackerkid/zulip,brainwane/zulip,Galexrt/zulip,kou/zulip,synicalsyntax/zulip,punchagan/zulip,zulip/zulip,showell/zulip,mahim97/zulip,hackerkid/zulip,Galexrt/zulip,Galexrt/zulip,shubhamdhama/zulip,shubhamdhama/zulip,hackerkid/zulip,tommyip/zulip,shubhamdhama/zulip,rht/zulip,brockwhittaker/zulip,brainwane/zulip,shubhamdhama/zulip,brockwhittaker/zulip,showell/zulip,jackrzhang/zulip,rht/zulip,tommyip/zulip,rishig/zulip,eeshangarg/zulip,timabbott/zulip,Galexrt/zulip,rht/zulip,kou/zulip,brockwhittaker/zulip,synicalsyntax/zulip,mahim97/zulip,timabbott/zulip,showell/zulip,synicalsyntax/zulip,rishig/zulip,brainwane/zulip,kou/zulip,andersk/zulip,rishig/zulip,timabbott/zulip,mahim97/zulip,synicalsyntax/zulip,tommyip/zulip,rishig/zulip,dhcrzf/zulip,brainwane/zulip,timabbott/zulip,rht/zulip,eeshangarg/zulip,punchagan/zulip,zulip/zulip,tommyip/zulip,punchagan/zulip,hackerkid/zulip,Galexrt/zulip,timabbott/zulip,brockwhittaker/zulip,shubhamdhama/zulip,mahim97/zulip,dhcrzf/zulip,mahim97/zulip,jackrzhang/zulip,synicalsyntax/zulip,hackerkid/zulip,showell/zulip,shubhamdhama/zulip,andersk/zulip,rht/zulip,synicalsyntax/zulip,dhcrzf/zulip,rishig/zulip,brainwane/zulip,andersk/zulip,showell/zulip,zulip/zulip,jackrzhang/zulip,zulip/zulip,shubhamdhama/zulip,brockwhittaker/zulip,eeshangarg/zulip,synicalsyntax/zulip,rishig/zulip,andersk/zulip,jackrzhang/zulip,punchagan/zulip,timabbott/zulip,rht/zulip,andersk/zulip,andersk/zulip,eeshangarg/zulip,kou/zulip,zulip/zulip,showell/zulip,jackrzhang/zulip,timabbott/zulip,zulip/zulip,punchagan/zulip,dhcrzf/zulip,rht/zulip,punchagan/zulip,tommyip/zulip,jackrzhang/zulip,kou/zulip,mahim97/zulip,dhcrzf/zulip,hackerkid/zulip,jackrzhang/zulip,eeshangarg/zulip,eeshangarg/zulip,Galexrt/zulip,Galexrt/zulip,brockwhittaker/zulip,andersk/zulip,showell/zulip,dhcrzf/zulip,dhcrzf/zulip,hackerkid/zulip,punchagan/zulip,brainwane/zulip,eeshangarg/zulip