     }
     
     override func replaceCharactersInRange(range: NSRange, withString str: String) {
-        var listItemFillText: String = ""
+        var listItemFillText: NSString = ""
         var currentNumber: Int?
         
         // Unordered and Ordered list auto-complete support

        
        beginEditing()
        
        currentString.replaceCharactersInRange(range, withString: str + listItemFillText)
        edited(.EditedCharacters, range: range, changeInLength: (str.characters.count + listItemFillText.characters.count) - range.length)
        
        endEditing()
        
        // Selected range changed.
        if listItemFillText != "" {
            let selectedRangeLocation = textView.selectedRange.location + listItemFillText.characters.count
            
            textView.selectedRange = NSRange(location: selectedRangeLocation, length: textView.selectedRange.length)
            

//                // Reorder numbers after current line.
//                var afterStrings = textView.text.substringFromIndex(textView.text.startIndex.advancedBy(textView.selectedRange.location))
//                
//                let orderedListAfterItemsMatches = NCKTextUtil.markdownOrderedListAfterItemsRegularExpression.matchesInString(afterStrings, options: [], range: NSRange(location: 0, length: NSString(string: afterStrings).length))
//                
//                for orderedListAfterItem in orderedListAfterItemsMatches {
//                    currentNumber! += 1
