<commit_before>package bbConvert

import "strings"

func bbconv(input string) string {
	for i := 0; i < len(input); i++ {
		if input[i] == '[' {
			for j := i; j < len(input); j++ {
				if input[j] == ']' && checktags(input[i:j+1]) {
					input = input[:i] + convert(input[i:j+1]) + input[j+1:]
					i = 0
					break
				}
			}
		}
	}
	return input
}

func convert(input string) string {
	var front, meat string
	for i, v := range input {
		if v == ']' {
			front = input[1:i]
			for j := len(input) - 1; j > i; j-- {
				if input[j] == '[' {
					meat = input[i+1 : j]
					break
				}
			}
			break
		}
	}
	out := toHTML(front, meat)
	return out
}

func checktags(input string) bool {
	input = strings.ToLower(input)
	c := make(chan string, 2)
	go checkfront(input, c)
	go checkback(input, c)
	fr, bk := <-c, <-c
	if fr == "Nope" || bk == "Nope" {
		return false
	}
	if fr == bk {<commit_msg>Converts stuff inside bb first<commit_after>package bbConvert

import "strings"

func bbconv(input string) string {
	for i := 0; i < len(input); i++ {
		if input[i] == '[' {
			for j := i; j < len(input); j++ {
				if input[j] == ']' && checktags(input[i:j+1]) {
					input = input[:i] + convert(input[i:j+1]) + input[j+1:]
					i = 0
					break
				}
			}
		}
	}
	return input
}

func convert(input string) string {
	var front, meat string
	for i, v := range input {
		if v == ']' {
			front = input[1:i]
			for j := len(input) - 1; j > i; j-- {
				if input[j] == '[' {
					meat = input[i+1 : j]
					break
				}
			}
			break
		}
	}
	out := toHTML(front, bbconv(meat))
	return out
}

func checktags(input string) bool {
	input = strings.ToLower(input)
	c := make(chan string, 2)
	go checkfront(input, c)
	go checkback(input, c)
	fr, bk := <-c, <-c
	if fr == "Nope" || bk == "Nope" {
		return false
	}
	if fr == bk {
{'fraction_non_alphanumeric': 0.18532818532818532, 'fraction_numerical': 0.009928295642581356, 'mean_word_length': 2.592079207920792, 'pattern_counts': {'":': 0, '<': 11, '<?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': '4568513', 'n_tokens_mistral': 866, 'n_tokens_neox': 743, 'n_words': 204}