mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	js: Fix a bunch of indentation issues found by eslint.
This is preparation for enabling an eslint indentation configuration. 90% of these changes are just fixes for indentation errors that have snuck into the codebase over the years; the others are more significant reformatting to make eslint happy (that are not otherwise actually improvements). The one area that we do not attempt to work on here is the "switch/case" indentation.
This commit is contained in:
		@@ -21,7 +21,7 @@ exports.message = function (response, status_box, cls, type, remove_after) {
 | 
			
		||||
    // Note we use html() below, since we can rely on our callers escaping HTML
 | 
			
		||||
    // via i18n.t when interpolating data.
 | 
			
		||||
    status_box.removeClass(common.status_classes).addClass(cls)
 | 
			
		||||
              .html(response).stop(true).fadeTo(0, 1);
 | 
			
		||||
        .html(response).stop(true).fadeTo(0, 1);
 | 
			
		||||
    if (remove_after) {
 | 
			
		||||
        setTimeout(function () {
 | 
			
		||||
            status_box.fadeTo(200, 0);
 | 
			
		||||
@@ -31,12 +31,12 @@ exports.message = function (response, status_box, cls, type, remove_after) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function escape(html) {
 | 
			
		||||
  return html
 | 
			
		||||
    .toString()
 | 
			
		||||
    .replace(/</g, '<')
 | 
			
		||||
    .replace(/>/g, '>')
 | 
			
		||||
    .replace(/"/g, '"')
 | 
			
		||||
    .replace(/'/g, ''');
 | 
			
		||||
    return html
 | 
			
		||||
        .toString()
 | 
			
		||||
        .replace(/</g, '<')
 | 
			
		||||
        .replace(/>/g, '>')
 | 
			
		||||
        .replace(/"/g, '"')
 | 
			
		||||
        .replace(/'/g, ''');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exports.error = function (response, xhr, status_box, type) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user