             let range = rangeForScope(scope, incrementingToken: incrementingToken, decrementingToken: decrementingToken)
             if let color = self.theme?[type] {
                 attributedString.addAttribute(NSForegroundColorAttributeName, value: color, range: range)
+                indexSet.addIndexesInRange(range)
             }
         }
     }

                })
            self.matches += array
            if let (start, end) = surroundingTokenPair(range) {
                self.process(start, decrementingToken: end, attributedString: attributedString)
            }
        }
        
        matches.sort { $0.range.location < $1.range.location }
        
        var incrementingTokens = [Int: Token]()
        var depth = 0

        case .All:
            return NSRange(start.location ..< end.location + end.length)
        case .Incrementing(let captureGroup):
            return incrementingToken.ranges[captureGroup]
        case .Decrementing(let captureGroup):
            return decrementingToken.ranges[captureGroup]
        case .Between:
            return NSRange(start.end ..< end.start)
        default:
