lib/assets/profile.js
function(name, syntax) {
			if (!name && syntax) {
				// search in user resources first
				var profile = resources.findItem(syntax, 'profile');
				if (profile) {
					name = profile;
				}
			}
			
			if (!name) {
				return profiles.plain;
			}
			
			if (name instanceof OutputProfile) {
				return name;
			}
			
			if (typeof name === 'string' && name.toLowerCase() in profiles) {
				return profiles[name.toLowerCase()];
			}
			
			return this.create(name);
		}
function(name, syntax) {
			if (!name && syntax) {
				// search in user resources first
				var profile = resources.findItem(syntax, 'profile');
				if (profile) {
					name = profile;
				}
			}
			
			if (!name) {
				return profiles.plain;
			}
			
			if (name instanceof OutputProfile) {
				return name;
			}
			
			if (typeof name === 'string' && name.toLowerCase() in profiles) {
				return profiles[name.toLowerCase()];
			}
			
			return this.create(name);
		}
function ( name , syntax ) { if ( ! name && syntax ) { // search in user resources first var profile = resources . findItem ( syntax , 'profile' ) ; if ( profile ) { name = profile ; } } if ( ! name ) { return profiles . plain ; } if ( name instanceof OutputProfile ) { return name ; } if ( typeof name === 'string' && name . toLowerCase ( ) in profiles ) { return profiles [ name . toLowerCase ( ) ] ; } return this . create ( name ) ; }
Returns profile by its name. If profile wasn't found, returns
'plain' profile
@param {String} name Profile name. Might be profile itself
@param {String} syntax. Optional. Current editor syntax. If defined,
profile is searched in resources first, then in predefined profiles
@returns {Object}
Returns profile by its name . If profile wasn t found returns plain profile