     ///   - spacer: The spacer between delimiter and string.
     ///   - ranges: The ranges where to comment out.
     /// - Returns: Items that contain editing information to insert comment delimiters.
-    func inlineCommentOut(delimiter: String, spacer: String, ranges: [NSRange]) -> [(string: String, location: Int, forward: Bool)] {
+    func inlineCommentOut(delimiter: String, spacer: String, ranges: [NSRange]) -> [NSRange.InsertionItem] {
         
         let regex = try! NSRegularExpression(pattern: "^", options: [.anchorsMatchLines])
         
         return ranges.flatMap { regex.matches(in: self, range: $0) }
             .map { $0.range.location }
             .unique
-            .map { (delimiter + spacer, $0, true) }
+            .map { NSRange.InsertionItem(string: delimiter + spacer, location: $0, forward: true) }
     }
     
     

        
        let spacer = self.appendsCommentSpacer ? " " : ""
        let targetRanges = self.commentingRanges(fromLineHead: fromLineHead)
        let items: [(string: String, location: Int, forward: Bool)] = {
            if let delimiter = self.inlineCommentDelimiter, types.contains(.inline) {
                return self.string.inlineCommentOut(delimiter: delimiter, spacer: spacer, ranges: targetRanges)
            }

        let newStrings = items.map { $0.string }
        let replacementRanges = items.map { NSRange($0.location..<$0.location) }
        let selectedRanges = (self.rangesForUserTextChange ?? self.selectedRanges)
            .map { $0.rangeValue.inserted(items: items) }
        
        self.replace(with: newStrings, ranges: replacementRanges, selectedRanges: selectedRanges,
                     actionName: "Comment Out".localized)
