export function expandAbbreviation()

in src/emmetHelper.ts [757:774]


export function expandAbbreviation(abbreviation: string | MarkupAbbreviation | StylesheetAbbreviation, config: UserConfig): string {
	let expandedText;
	const resolvedConfig = resolveConfig(config);
	if (config.type === 'stylesheet') {
		if (typeof abbreviation === 'string') {
			expandedText = expand(abbreviation, resolvedConfig);
		} else {
			expandedText = stringifyStylesheet(abbreviation as StylesheetAbbreviation, resolvedConfig);
		}
	} else {
		if (typeof abbreviation === 'string') {
			expandedText = expand(abbreviation, resolvedConfig);
		} else {
			expandedText = stringifyMarkup(abbreviation as MarkupAbbreviation, resolvedConfig);
		}
	}
	return escapeNonTabStopDollar(addFinalTabStop(expandedText));
}