     
     private var highlightCache: Cache?  // results cache of the last whole string highlights
     
+    private var textEditingObserver: AnyCancellable?
+    
     
     
     // MARK: -

        
        self.textStorage = textStorage
        self.style = style
    }
    
    

        
        let operation = SyntaxHighlightParseOperation(definition: definition, string: string, range: highlightRange)
        
        operation.completionBlock = { [weak self, weak operation, styleName = self.style.name] in
            guard
                let highlights = operation?.highlights,
                let progress = operation?.progress,
                !progress.isCancelled
                else { return }
            
            DispatchQueue.main.async {
                guard !progress.isCancelled else { return }
                
                if highlightRange == string.nsRange {
                    self?.highlightCache = Cache(styleName: styleName, string: string, highlights: highlights)
                }
