<commit_before>var express = require('express');
var router = express.Router();
var depts = require('../bin/departments');
var postgresModel = require('../models/postgres.js');
var hbs = require('hbs');
var paginate = require('handlebars-paginate');
var ua = require('universal-analytics');
var queryString = require('querystring');


hbs.registerHelper('paginate', paginate);
hbs.registerHelper('paginate-link', function(url, pageNum) {
  //important - page number parameter must be last in url for this to work
  if (url.indexOf('?') > -1) { //contains params
    if (url.indexOf('?p=') > -1) { // already contains page number param
      return url.substring(0, url.indexOf('?p=')) + "?p=" + pageNum.toString();
    } else if (url.indexOf('&p=') > -1){  // already contains page number and other params
      return url.substring(0, url.indexOf('&p=')) + "&p=" + pageNum.toString();
    } else {
      return url + "&p=" + pageNum.toString();
    }
  } else {
    return url + "?p=" + pageNum.toString();
  }
});
var deptBreaker = '<span style="display:block;height:0px;width:0px;margin:0px;padding:0px;line-height:0px;"></span>';
hbs.registerHelper('split-depts', function(str) {
  str = hbs.Utils.escapeExpression(str);
  str = str.replace(/;/g, deptBreaker);
  return new hbs.SafeString(str);<commit_msg>Now actually do the spacing<commit_after>var express = require('express');
var router = express.Router();
var depts = require('../bin/departments');
var postgresModel = require('../models/postgres.js');
var hbs = require('hbs');
var paginate = require('handlebars-paginate');
var ua = require('universal-analytics');
var queryString = require('querystring');


hbs.registerHelper('paginate', paginate);
hbs.registerHelper('paginate-link', function(url, pageNum) {
  //important - page number parameter must be last in url for this to work
  if (url.indexOf('?') > -1) { //contains params
    if (url.indexOf('?p=') > -1) { // already contains page number param
      return url.substring(0, url.indexOf('?p=')) + "?p=" + pageNum.toString();
    } else if (url.indexOf('&p=') > -1){  // already contains page number and other params
      return url.substring(0, url.indexOf('&p=')) + "&p=" + pageNum.toString();
    } else {
      return url + "&p=" + pageNum.toString();
    }
  } else {
    return url + "?p=" + pageNum.toString();
  }
});
var deptBreaker = '<span style="display:block;height:18px;width:0px;margin:0px;padding:0px;line-height:0px;"></span>';
hbs.registerHelper('split-depts', function(str) {
  str = hbs.Utils.escapeExpression(str);
  str = str.replace(/;/g, deptBreaker);
  return new hbs.SafeString(str);
{'fraction_non_alphanumeric': 0.1874762808349146, 'fraction_numerical': 0.007969639468690701, 'mean_word_length': 4.457556935817806, 'pattern_counts': {'":': 0, '<': 7, '<?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': '763687', 'n_tokens_mistral': 863, 'n_tokens_neox': 852, 'n_words': 203}