<commit_before>app.directive('prettyError', function ($timeout) {
	'use strict';
	return {
		scope: {
			errors: '=',
		},
		link: function (scope, elm, attrs) {},
		template: '<ul class="list-group" ng-show="errors.summaryReport.length ||errors.message">'
				+ '<li class="list-group-item h4 list-group-item-danger">Please solve the problems below</li>'
				+ '<li class="errorMessage list-group-item" ng-repeat="m in errors.summaryReport track by $index">{{m}}</li>'
				+ '<li class="errorMessage list-group-item" ng-show="errors.message">{{errors.message}}</li>'
				+ '</ul>'

	};
})<commit_msg>move error message under the title (was hidden before)  and scroll to top on error<commit_after>app.directive('prettyError', function ($timeout) {
	'use strict';
	return {
		scope: {
			errors: '=',
		},
		link: function (scope, elm, attrs) {
			scope.$watch('errors', function(n) {
				if (typeof(n) !== 'undefined' &&
						((typeof(n.summaryReport) !== 'undefined' && n.summaryReport.length) ||n.message)) {
					$("body").animate({scrollTop: 0}, "fast")
				}
			}, true);
		},
		template: '<ul class="list-group" ng-show="errors.summaryReport.length ||errors.message">'
				+ '<br/><br/><br/>'
				+ '<li class="list-group-item h4 list-group-item-danger">Please solve the problems below</li>'
				+ '<li class="errorMessage list-group-item" ng-repeat="m in errors.summaryReport track by $index">{{m}}</li>'
				+ '<li class="errorMessage list-group-item" ng-show="errors.message">{{errors.message}}</li>'
				+ '</ul>'

	};
})
{'fraction_non_alphanumeric': 0.20822454308093996, 'fraction_numerical': 0.0019582245430809398, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '4652365', 'n_tokens_mistral': 571, 'n_tokens_neox': 501, 'n_words': 108}