'Actually highlight the block'

def highlightBlock(self, text):

    if self._allow_highlight:
        start = (self.previousBlockState() + 1)
        end = (start + len(text))
        for (i, (fmt, letter)) in enumerate(self._charlist[start:end]):
            self.setFormat(i, 1, fmt)
        self.setCurrentBlockState(end)
        self.highlight_spaces(text)
