<commit_before>//
//  TwitterSymbol.swift
//  Account
//
//  Created by <NAME> on 4/18/20.
//  Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//

import Foundation

struct TwitterSymbol: Codable, TwitterEntity {
	
	let name: String?
	let indices: [Int]?

	enum CodingKeys: String, CodingKey {
		case name = "name"
		case indices = "indices"
	}

	func renderAsHTML() -> String {
		var html = String()
		if let name = name {
			html += "<a href=\"https://twitter.com/search?q=%24\(name)\">$\(name)</a>"
		}
		return html
	}
	
}
<commit_msg>Fix bug that was incorrectly parsing Twitter Symbols. Fixes #3248<commit_after>//
//  TwitterSymbol.swift
//  Account
//
//  Created by <NAME> on 4/18/20.
//  Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//

import Foundation

struct TwitterSymbol: Codable, TwitterEntity {
	
	let text: String?
	let indices: [Int]?

	enum CodingKeys: String, CodingKey {
		case text = "text"
		case indices = "indices"
	}

	func renderAsHTML() -> String {
		var html = String()
		if let text = text {
			html += "<a href=\"https://twitter.com/search?q=%24\(text)\">$\(text)</a>"
		}
		return html
	}
	
}

{'fraction_non_alphanumeric': 0.153713298791019, 'fraction_numerical': 0.022452504317789293, 'mean_word_length': 3.066666666666667, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '1217808', 'n_tokens_mistral': 443, 'n_tokens_neox': 390, 'n_words': 117}