I would like to have existing ANSI sequences already within some target text that I want to highlight. I'm doing this for a custom text editor which will need background coloring in arbitrary locations for visual highlighting. To make handling the offsets where this highlighting starts and ends as easy as possible, I'd like to add those sequences in prior to adding in the ANSI sequences resulting from the syntax highlighting. Is there a way to do this or a better way to meet the same end?