<commit_before>var assign = require('object-assign');

module.exports = function initTrustProxy (keystone, app) {
	// Apply locals
	if (typeof keystone.get('locals') === 'object') {
		assign(app.locals, keystone.get('locals'));
	}

	// Default "pretty html" mode except in production
	if (keystone.get('env') !== 'production') {
		app.locals.pretty = true;
	}
};
<commit_msg>Allowing locals setting to specify pretty option, fixes #2614<commit_after>var assign = require('object-assign');

module.exports = function initViewLocals (keystone, app) {
	// Apply locals
	if (typeof keystone.get('locals') === 'object') {
		assign(app.locals, keystone.get('locals'));
	}

	// Default "pretty html" mode except in production
	// Only if it has not been specified in the locals setting
	if (app.locals.pretty === undefined && keystone.get('env') !== 'production') {
		app.locals.pretty = true;
	}
};

{'fraction_non_alphanumeric': 0.1601343784994401, 'fraction_numerical': 0.004479283314669653, 'mean_word_length': 4.5875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4705666', 'n_tokens_mistral': 304, 'n_tokens_neox': 280, 'n_words': 77}