<commit_before>import { copyRegexp } from "./utils";
import { join } from "path";
import { parse, pack, isRenegadeFile } from "./renegade-helpers";

const defaultOpts = {
  baseDir: __dirname,
  imgTagRegexp: /<(?:img|video|source)[^>]+src=["']([^"']+)["'][^>]*>/i
};

export default function(opts = {}) {
  opts = Object.assign({}, defaultOpts, opts);
  return {
    name: "tag-plugin",
    async transform(code, _id) {
      debugger;
      if (!isRenegadeFile(code)) {
        return;
      }
      let { id, contents } = parse(code);
      contents = contents.map(async contentChunk => {<commit_msg>Don't parse img tags that use rollup functions<commit_after>import { copyRegexp } from "./utils";
import { join } from "path";
import { parse, pack, isRenegadeFile } from "./renegade-helpers";

const defaultOpts = {
  baseDir: __dirname,
  imgTagRegexp: /<(?:img|video|source)[^>]+src=["']([^"'(]+)["'][^>]*>/i
};

export default function(opts = {}) {
  opts = Object.assign({}, defaultOpts, opts);
  return {
    name: "tag-plugin",
    async transform(code, _id) {
      debugger;
      if (!isRenegadeFile(code)) {
        return;
      }
      let { id, contents } = parse(code);
      contents = contents.map(async contentChunk => {
{'fraction_non_alphanumeric': 0.18870967741935485, 'fraction_numerical': 0.0, 'mean_word_length': 3.5625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6787685', 'n_tokens_mistral': 415, 'n_tokens_neox': 417, 'n_words': 95}