 
 fileprivate struct MarkRegExPattern {
     
-    static let protocolStatementLine = "(class|struct|extension|protocol)(.*:.*,.*)"
+    static let protocolStatementLine = "(class|struct|extension|protocol|enum)(.*:.*,.*)"
     static let protocolStatementString = ":.*"
+    static let extensionString = "extension"
+    static let commaString = ","
 }
 
 extension NSRegularExpression {

            var linesToInsert = [String]()

            let line = buffer.lines[index] as! String
            if let match = protocolStringRegEx.matches(in: line)?.first {
                let range = match.range
                let substring = (line as NSString).substring(with: range)
                linesToInsert = parse(string: substring)
            }
            result.append(MarkTuple(index, linesToInsert))
        }
 
        return result

        var matches = [Int]()
        for lineIndex in 0 ..< buffer.lines.count {
            let line = buffer.lines[lineIndex] as! String
            let resultProtocolRegEx = protocolLineRegEx.matches(in: line)
            if (resultProtocolRegEx?.count)! > 0 ||  isExtension(line: line) {
                matches.append(lineIndex)
            }
        }
        return matches
    }
    
    fileprivate static func isExtension(line: String) -> Bool {
        return line.contains(MarkRegExPattern.extensionString) &&
        (line.contains(MarkRegExPattern.commaString) == false)
    }
}
