<commit_before>/*jslint node: true */
'use strict';

/**
 * Load configuration file given as command line parameter
 */
 if (process.argv.length > 2) {
  console.log('loading configuration file: ' + process.argv[2]);
  var config = require(process.argv[2]);
  if (process.argv.length > 3){
    config.backend = process.argv[3];
  }
}else{
  console.error('no configuration file provided');
  process.exit();
}

/**
 * Module dependencies.
 */

var koa = require('koa');
var logger = require('koa-logger');
var route = require('koa-route');
var nunjucks = require('koa-nunjucks-2');
var path = require('path');
var request = require('superagent');
var thunkify = require('thunkify');
var get = thunkify(request.get);
var markdownParser = new require('markdown-it')();

// TODO: Remove this when using live backend
var notes = require('./notes.json');

// Open links to new tab.
// https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer

// Remember old renderer, if overriden, or proxy to default renderer<commit_msg>Correctly initialize markdown parser (with parameters). Fixes people contacts not having a line break.<commit_after>/*jslint node: true */
'use strict';

/**
 * Load configuration file given as command line parameter
 */
 if (process.argv.length > 2) {
  console.log('loading configuration file: ' + process.argv[2]);
  var config = require(process.argv[2]);
  if (process.argv.length > 3){
    config.backend = process.argv[3];
  }
}else{
  console.error('no configuration file provided');
  process.exit();
}

/**
 * Module dependencies.
 */

var koa = require('koa');
var logger = require('koa-logger');
var route = require('koa-route');
var nunjucks = require('koa-nunjucks-2');
var path = require('path');
var request = require('superagent');
var thunkify = require('thunkify');
var get = thunkify(request.get);
var markdownParser = require('markdown-it')({breaks: true});

// TODO: Remove this when using live backend
var notes = require('./notes.json');

// Open links to new tab.
// https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer

// Remember old renderer, if overriden, or proxy to default renderer
{'fraction_non_alphanumeric': 0.1574623459607485, 'fraction_numerical': 0.005476951163852123, 'mean_word_length': 4.425742574257426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '710142', 'n_tokens_mistral': 680, 'n_tokens_neox': 669, 'n_words': 192}