<commit_before>//
//  StructuredText.swift
//  SwiftLint
//
//  Created by <NAME> on 20/05/15.
//  Copyright (c) 2015 Realm. All rights reserved.
//

import Foundation

typealias StructuredInlineText = String

enum StructuredText {
    case Header(level: Int, text: StructuredInlineText)
    case Paragraph(StructuredInlineText)
    case List([StructuredText])
    case Joined([StructuredText])

    var markdown: String {
        switch self {
        case let .Header(level, t):
            return String(Repeat(count: level, repeatedValue: "#")) + " \(t)"
        case .Paragraph(let t):
            return t
        case .List(let items):
            return items.map({ "* " + $0.markdown }).joinWithSeparator("\n")
        case .Joined(let items):
            return items.map({ $0.markdown }).joinWithSeparator("\n\n")
        }
    }

    var ansi: String {
        switch self {
        case .Header(1, let t): return t.uppercaseString
        case .Header(_, let t): return t
        case .Paragraph(let t): return t
        case .List(let items): return items.map({ "* " + $0.ansi }).joinWithSeparator("\n")
        case .Joined(let items): return items.map({ $0.ansi } ).joinWithSeparator("\n\n")
        }
    }
}<commit_msg>extra space<commit_after>//
//  StructuredText.swift
//  SwiftLint
//
//  Created by <NAME> on 20/05/15.
//  Copyright (c) 2015 Realm. All rights reserved.
//

import Foundation

typealias StructuredInlineText = String

enum StructuredText {
    case Header(level: Int, text: StructuredInlineText)
    case Paragraph(StructuredInlineText)
    case List([StructuredText])
    case Joined([StructuredText])

    var markdown: String {
        switch self {
        case let .Header(level, t):
            return String(Repeat(count: level, repeatedValue: "#")) + " \(t)"
        case .Paragraph(let t):
            return t
        case .List(let items):
            return items.map({ "* " + $0.markdown }).joinWithSeparator("\n")
        case .Joined(let items):
            return items.map({ $0.markdown }).joinWithSeparator("\n\n")
        }
    }

    var ansi: String {
        switch self {
        case .Header(1, let t): return t.uppercaseString
        case .Header(_, let t): return t
        case .Paragraph(let t): return t
        case .List(let items): return items.map({ "* " + $0.ansi }).joinWithSeparator("\n")
        case .Joined(let items): return items.map({ $0.ansi }).joinWithSeparator("\n\n")
        }
    }
}
{'fraction_non_alphanumeric': 0.14002428166734115, 'fraction_numerical': 0.012140833670578713, 'mean_word_length': 2.3360323886639676, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5814846', 'n_tokens_mistral': 771, 'n_tokens_neox': 755, 'n_words': 205}