Remove unused code
Bug fix: don't hang on empty regexp
Fix incorrect highlighting of multiline matched text
Highlight parent brackets