Fix regression that sometimes caused incorrect syntax highlighting when non-breaking spaces/typographic hyphens are present in the text. Fixes #1321317 [Edit book: Wrong hilighting in spaces](https://bugs.launchpad.net/calibre/+bug/1321317)