<commit_before>'use strict';

module.exports = {
  name: 'ember-marked',

  contentFor: function (type, config) {
    var conf = config.marked || {}, what, content = [];
    if (type === 'head') {
      // include highlightjs
      if (!conf.hasOwnProperty('highlightjs') || conf.highlightjs) {
        if (conf.highlightjs && typeof conf.highlightjs === 'object') {
          what = conf.highlightjs;
        }
        else {
          what = {};
        }
        if (what.version == null) {
          what.version = '8.3';
        }
        if (what.js == null || what.js === true) {
          what.js = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/' + what.version + '/highlight.min.js';
        }
        if (what.css == null || what.css === true) {
          what.css = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/' + what.version + '/styles/default.min.css';
        }
        if (what.js) {
          content.push('<link rel="stylesheet" href="' + what.css + '">');
        }
        if (what.css) {
          content.push('<script src="' + what.js + '"></script>');
        }
      }

      // include marked
      if (conf.version == null) {
        conf.version = '0.3.2';
      }
      if (conf.js == null || conf.js === true) {
        conf.js = '//cdnjs.cloudflare.com/ajax/libs/marked/' + conf.version + '/marked.min.js';
      }
      if (conf.js) {
        content.push('<script src="' + conf.js + '"></script>');
      }
    }
    return content.join('') || null;
  }
};<commit_msg>Fixing JavaScript load order, fixes #7. Also fixes load order of config.<commit_after>'use strict';

module.exports = {
  name: 'ember-marked',

  contentFor: function (type, config) {
    var conf = config.marked || {}, what, cssContent = [], scriptContent = [];
    if (type === 'head' || type === 'body') {
      // include highlightjs
      if (!conf.hasOwnProperty('highlightjs') || conf.highlightjs) {
        if (conf.highlightjs && typeof conf.highlightjs === 'object') {
          what = conf.highlightjs;
        }
        else {
          what = {};
        }
        if (what.version == null) {
          what.version = '8.3';
        }
        if (what.js == null || what.js === true) {
          what.js = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/' + what.version + '/highlight.min.js';
        }
        if (what.css == null || what.css === true) {
          what.css = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/' + what.version + '/styles/default.min.css';
        }
        if (what.css) {
          cssContent.push('<link rel="stylesheet" href="' + what.css + '">');
        }
        if (what.js) {
          scriptContent.push('<script src="' + what.js + '"></script>');
        }
      }

      // include marked
      if (conf.version == null) {
        conf.version = '0.3.2';
      }
      if (conf.js == null || conf.js === true) {
        conf.js = '//cdnjs.cloudflare.com/ajax/libs/marked/' + conf.version + '/marked.min.js';
      }
      if (conf.js) {
        scriptContent.push('<script src="' + conf.js + '"></script>');
      }
    }
    if (type === 'head') {
      return cssContent.join('');
    }
    if (type === 'body') {
      return scriptContent.join('');
    }
    return null;
  }
};
{'fraction_non_alphanumeric': 0.19303114400246685, 'fraction_numerical': 0.0033919210607462227, 'mean_word_length': 1.870796460176991, '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': '689424', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1017, 'n_words': 205}