<commit_before>﻿using PvcCore;
using System.Collections.Generic;
using System.IO;

namespace PvcPlugins
{
    public class PvcLess : PvcPlugin
    {
        public override string[] SupportedTags
        {
            get
            {
                return new string[] { ".less" };
            }
        }

        public override IEnumerable<PvcStream> Execute(IEnumerable<PvcStream> inputStreams)
        {
            var lessEngine = new dotless.Core.LessEngine();
            var resultStreams = new List<PvcStream>();

            foreach (var inputStream in inputStreams)
            {
                var lessContent = inputStream.ToString();
                var cssContent = lessEngine.TransformToCss(lessContent, "");

                var resultStream = PvcUtil.StringToStream(cssContent, inputStream.StreamName);
                resultStreams.Add(resultStream);
            }

            return resultStreams;
        }
    }
}<commit_msg>Rename file to .css for new stream<commit_after>﻿using PvcCore;
using System.Collections.Generic;
using System.IO;

namespace PvcPlugins
{
    public class PvcLess : PvcPlugin
    {
        public override string[] SupportedTags
        {
            get
            {
                return new string[] { ".less" };
            }
        }

        public override IEnumerable<PvcStream> Execute(IEnumerable<PvcStream> inputStreams)
        {
            var lessEngine = new dotless.Core.LessEngine();
            var resultStreams = new List<PvcStream>();

            foreach (var inputStream in inputStreams)
            {
                var lessContent = inputStream.ToString();
                var cssContent = lessEngine.TransformToCss(lessContent, "");

                var newStreamName = Path.Combine(Path.GetDirectoryName(inputStream.StreamName), Path.GetFileNameWithoutExtension(inputStream.StreamName) + ".css");
                var resultStream = PvcUtil.StringToStream(cssContent, newStreamName);
                resultStreams.Add(resultStream);
            }

            return resultStreams;
        }
    }
}
{'fraction_non_alphanumeric': 0.08349328214971209, 'fraction_numerical': 0.0, 'mean_word_length': 1.944915254237288, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3547485', 'n_tokens_mistral': 545, 'n_tokens_neox': 526, 'n_words': 115}