lib/filter/main.js
function(syntax, profileName, additionalFilters) {
			profileName = profile.get(profileName);
			var filters = list(profileName.filters || resources.findItem(syntax, 'filters') || basicFilters);
			
			if (profileName.extraFilters) {
				filters = filters.concat(list(profileName.extraFilters));
			}
				
			if (additionalFilters) {
				filters = filters.concat(list(additionalFilters));
			}
				
			if (!filters || !filters.length) {
				// looks like unknown syntax, apply basic filters
				filters = list(basicFilters);
			}
				
			return filters;
		}
function(syntax, profileName, additionalFilters) {
			profileName = profile.get(profileName);
			var filters = list(profileName.filters || resources.findItem(syntax, 'filters') || basicFilters);
			
			if (profileName.extraFilters) {
				filters = filters.concat(list(profileName.extraFilters));
			}
				
			if (additionalFilters) {
				filters = filters.concat(list(additionalFilters));
			}
				
			if (!filters || !filters.length) {
				// looks like unknown syntax, apply basic filters
				filters = list(basicFilters);
			}
				
			return filters;
		}
function ( syntax , profileName , additionalFilters ) { profileName = profile . get ( profileName ) ; var filters = list ( profileName . filters || resources . findItem ( syntax , 'filters' ) || basicFilters ) ; if ( profileName . extraFilters ) { filters = filters . concat ( list ( profileName . extraFilters ) ) ; } if ( additionalFilters ) { filters = filters . concat ( list ( additionalFilters ) ) ; } if ( ! filters || ! filters . length ) { // looks like unknown syntax, apply basic filters filters = list ( basicFilters ) ; } return filters ; }
Composes list of filters that should be applied to a tree, based on
passed data
@param {String} syntax Syntax name ('html', 'css', etc.)
@param {Object} profile Output profile
@param {String} additionalFilters List or pipe-separated
string of additional filters to apply
@returns {Array}
Composes list of filters that should be applied to a tree based on passed data