<commit_before>docTests.preWithoutClass = {
  name: "pre_without_class",
  desc: "pre_without_class_desc",
  check: function checkPreWithoutClass(rootElement) {
    let presWithoutClass = rootElement.querySelectorAll("pre:-moz-any(:not([class]), [class=''])");
    let matches = [];

    for (let i = 0; i < presWithoutClass.length; i++) {
      matches.push({
        msg: presWithoutClass[i].outerHTML,
        type: WARNING
      })
    }

    return matches;
  }
};<commit_msg>Added recognition of valid and invalid use of <pre> without class (fixes #174)<commit_after>docTests.preWithoutClass = {
  name: "pre_without_class",
  desc: "pre_without_class_desc",
  check: function checkPreWithoutClass(rootElement) {
    let presWithoutClass = rootElement.querySelectorAll("pre:-moz-any(:not([class]), [class=''])");
    let matches = [];

    for (let i = 0; i < presWithoutClass.length; i++) {
      // If the content is recognized as folder structure, don't add a warning for empty <pre>
      if (presWithoutClass[i].textContent.match(/^\S[^\n\*]*\/\n/)) {
        continue;
      }

      let type = WARNING;

      // If the content is recognized as code or {{csssyntax}} macro, mark it as error
      if (presWithoutClass[i].textContent.match(/^\s*(?:\/\*.+?\*\/|<.+?>|@[^\s\n]+[^\n]*\{\n|\{\{\s*csssyntax(?:\(\))?\s*\}\})/)) {
        type = ERROR;
      }
      
      matches.push({
        msg: presWithoutClass[i].outerHTML,
        type: type
      })
    }

    return matches;
  }
};
{'fraction_non_alphanumeric': 0.17533333333333334, 'fraction_numerical': 0.0033333333333333335, 'mean_word_length': 2.981432360742706, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '1983650', 'n_tokens_mistral': 493, 'n_tokens_neox': 475, 'n_words': 107}