<commit_before>import { remote, ipcRenderer, clipboard } from 'electron';
import jetpack from 'fs-jetpack';
import './polyfills';
import './color';
import fh from './helpers/fileHelpers';
import env from './env';
import './xelib';
import buildModuleService from './helpers/moduleService';

// initialize xelib when application starts
xelib.Initialize();

// set up angular application
const ngapp = angular.module('zedit', [
    'ui.router', 'ct.ui.router.extras', 'angularSpinner', 'vs-repeat',
    'mp.colorPicker', 'puElasticInput', 'hc.marked'
]);

//this allows urls with and without trailing slashes to go to the same state
ngapp.config(function($urlMatcherFactoryProvider) {
    $urlMatcherFactoryProvider.strictMode(false);
});

// state redirects
ngapp.run(['$rootScope', '$state', function($rootScope, $state) {
    $rootScope.$on('$stateChangeStart', function (e, toState, params) {
        if (toState.redirectTo) {
            e.preventDefault();
            $state.go(toState.redirectTo, params, {location: 'replace'});
        }
    });
}]);

//== begin angular files ==
//=include Directives/*.js
//=include Factories/*.js
//=include Filters/*.js
//=include Services/*.js
//=include Views/**/*.js
//== end angular files ==

// load modules
const moduleService = buildModuleService(ngapp, fh);
moduleService.loadModules();
ngapp.run(() => moduleService.loadDeferredModules());<commit_msg>fixed documentation hyperlinks not working in production<commit_after>import { remote, ipcRenderer, clipboard } from 'electron';
import jetpack from 'fs-jetpack';
import './polyfills';
import './color';
import fh from './helpers/fileHelpers';
import env from './env';
import './xelib';
import buildModuleService from './helpers/moduleService';

// initialize xelib when application starts
xelib.Initialize();

// set up angular application
const ngapp = angular.module('zedit', [
    'ui.router', 'ct.ui.router.extras', 'angularSpinner', 'vs-repeat',
    'mp.colorPicker', 'puElasticInput', 'hc.marked'
]);

ngapp.config(function($urlMatcherFactoryProvider, $compileProvider) {
    // allow urls with and without trailing slashes to go to the same state
    $urlMatcherFactoryProvider.strictMode(false);
    // allow docs:// urls
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|file|docs):/);
});

// state redirects
ngapp.run(['$rootScope', '$state', function($rootScope, $state) {
    $rootScope.$on('$stateChangeStart', function (e, toState, params) {
        if (toState.redirectTo) {
            e.preventDefault();
            $state.go(toState.redirectTo, params, {location: 'replace'});
        }
    });
}]);

//== begin angular files ==
//=include Directives/*.js
//=include Factories/*.js
//=include Filters/*.js
//=include Services/*.js
//=include Views/**/*.js
//== end angular files ==

// load modules
const moduleService = buildModuleService(ngapp, fh);
moduleService.loadModules();
ngapp.run(() => moduleService.loadDeferredModules());
{'fraction_non_alphanumeric': 0.16610512129380053, 'fraction_numerical': 0.0, 'mean_word_length': 4.273534635879218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '477233', 'n_tokens_mistral': 889, 'n_tokens_neox': 890, 'n_words': 223}