<commit_before>//
//  ElloTextButton.swift
//  Ello
//
//  Created by <NAME> on 11/24/14.
//  Copyright (c) 2014 Ello. All rights reserved.
//

import UIKit

public class ElloTextButton: UIButton {

    required override public init(frame: CGRect) {
        super.init(frame: frame)
        sharedSetup()
    }

    required public init(coder: NSCoder) {
        super.init(coder: coder)
        sharedSetup()
    }

    private func sharedSetup() {
        self.backgroundColor = UIColor.clearColor()
        let lineBreakMode = self.titleLabel?.lineBreakMode ?? .ByWordWrapping
        if lineBreakMode != .ByWordWrapping
        {
            self.titleLabel?.numberOfLines = 1
        }
        self.setTitleColor(UIColor.greyA(), forState: UIControlState.Normal)

        if let title = self.titleLabel?.text {
            let attributedString = NSAttributedString(string: title, attributes: [<commit_msg>whitespace<commit_after>//
//  ElloTextButton.swift
//  Ello
//
//  Created by <NAME> on 11/24/14.
//  Copyright (c) 2014 Ello. All rights reserved.
//

import UIKit

public class ElloTextButton: UIButton {

    required override public init(frame: CGRect) {
        super.init(frame: frame)
        sharedSetup()
    }

    required public init(coder: NSCoder) {
        super.init(coder: coder)
        sharedSetup()
    }

    private func sharedSetup() {
        self.backgroundColor = UIColor.clearColor()
        let lineBreakMode = self.titleLabel?.lineBreakMode ?? .ByWordWrapping
        if lineBreakMode != .ByWordWrapping {
            self.titleLabel?.numberOfLines = 1
        }
        self.setTitleColor(UIColor.greyA(), forState: UIControlState.Normal)

        if let title = self.titleLabel?.text {
            let attributedString = NSAttributedString(string: title, attributes: [
{'fraction_non_alphanumeric': 0.10503040353786622, 'fraction_numerical': 0.012161415146489774, 'mean_word_length': 2.5145631067961167, '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': '3291060', 'n_tokens_mistral': 565, 'n_tokens_neox': 537, 'n_words': 124}