<commit_before>//An easy way to convert BBCode to HTML with Go.
package bbConvert

import(
    "strings"
)

var(
    classes string
    styleness string
)

//Takes in a string slice (with bbcode) and converts it to proper HTML as a single string
//If pWrap == true then each part of the slice is surrounded in paragraph tags
//If pWrap == true and it finds a list, it will wrap the list in paragraph tags
func Convert(strs []string, pWrap bool) string{
    parsedStrs := make([]string,0)
    for i:= 0;i<len(strs);i++{
        v := strs[i]
        if strings.HasPrefix(v,"[ul]") ||strings.HasSuffix(v,"[ul]"){
            for j := i;j<len(strs);j++{
                tm := strs[j]
                var tmp string
                if strings.HasPrefix(tm,"[/ul]") || strings.HasSuffix(tm,"[/ul]"{
                    for _,val := range strs[i:j+1]{
                        tmp += val
                    }
                    parsedStrs = append(parsedStrs,tmp)<commit_msg>Improved list detection<commit_after>//An easy way to convert BBCode to HTML with Go.
package bbConvert

import(
    "strings"
)

var(
    classes string
    styleness string
)

//Takes in a string slice (with bbcode) and converts it to proper HTML as a single string
//If pWrap == true then each part of the slice is surrounded in paragraph tags
//If pWrap == true and it finds a list, it will wrap the list in paragraph tags
func Convert(strs []string, pWrap bool) string{
    parsedStrs := make([]string,0)
    for i:= 0;i<len(strs);i++{
        v := strs[i]
        if strings.HasPrefix(v,"[ul]") ||strings.HasSuffix(v,"[ul]"){
            for j := i;j<len(strs);j++{
                tm := strs[j]
                var tmp string
                if strings.HasPrefix(tm,"[/ul]") || strings.HasSuffix(tm,"[/ul]"){
                    for _,val := range strs[i:j+1]{
                        tmp += val
                    }
                    parsedStrs = append(parsedStrs,tmp)
{'fraction_non_alphanumeric': 0.12365315546434069, 'fraction_numerical': 0.0030785017957927143, 'mean_word_length': 2.12, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '1913304', 'n_tokens_mistral': 619, 'n_tokens_neox': 590, 'n_words': 203}