<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Consola.Library.util
{
    public class Outputline
    {
        private StringBuilder buffer;

        private void initialize()
        {
            buffer = new StringBuilder();
        }

        public Outputline()
        {
            initialize();
        }

        public Outputline(string text)
        {
            initialize();
            buffer.Append(text);
        }

        internal string generateString()
        {
            return buffer.ToString();
        }

        #region append

        public Outputline Append(string text)
        {
            text = text.Replace(Environment.NewLine, "</br>");
            buffer.Append(text);
            return this;
        }

        public Outputline Append(char chr)
        {
            buffer.Append(chr);
            return this;
        }

        public Outputline Append(Outputline second)
        {
            return Append(second.generateString());
        }

        private const string colorTemplate = "<span style=\"color:{0}\">{1}</span>";
        public Outputline AppendColor(string text, string color)
        {
            return Append(String.Format(colorTemplate, color, text));
        }

        private const string linkTemplate = "<a href=\"{0}\">{1}</a>";
        public Outputline AppendLink(string url, string text = null)
        {
            if (text == null) text = url;
            return Append(String.Format(linkTemplate, url, text));
        }
        #endregion

    }
}<commit_msg>Edited the linktemplat to make links show in new windows/tabs<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Consola.Library.util
{
    public class Outputline
    {
        private StringBuilder buffer;

        private void initialize()
        {
            buffer = new StringBuilder();
        }

        public Outputline()
        {
            initialize();
        }

        public Outputline(string text)
        {
            initialize();
            buffer.Append(text);
        }

        internal string generateString()
        {
            return buffer.ToString();
        }

        #region append

        public Outputline Append(string text)
        {
            text = text.Replace(Environment.NewLine, "</br>");
            buffer.Append(text);
            return this;
        }

        public Outputline Append(char chr)
        {
            buffer.Append(chr);
            return this;
        }

        public Outputline Append(Outputline second)
        {
            return Append(second.generateString());
        }

        private const string colorTemplate = "<span style=\"color:{0}\">{1}</span>";
        public Outputline AppendColor(string text, string color)
        {
            return Append(String.Format(colorTemplate, color, text));
        }

        private const string linkTemplate = "<a href=\"{0}\" target=\"_blank\">{1}</a>";
        public Outputline AppendLink(string url, string text = null)
        {
            if (text == null) text = url;
            return Append(String.Format(linkTemplate, url, text));
        }
        #endregion

    }
}
{'fraction_non_alphanumeric': 0.10239520958083832, 'fraction_numerical': 0.0023952095808383233, 'mean_word_length': 1.747532894736842, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6324721', 'n_tokens_mistral': 829, 'n_tokens_neox': 828, 'n_words': 212}