in src/emmetHelper.ts [462:478]
export function extractAbbreviationFromText(text: string, syntax: string): { abbreviation: string, filter: string | undefined } | undefined {
if (!text) {
return;
}
const { pos, filter } = getFilters(text, text.length);
const extractOptions = (isStyleSheet(syntax) || syntax === 'stylesheet') ?
{ syntax: 'stylesheet', lookAhead: false } :
{ lookAhead: true };
const result = extract(text, pos, extractOptions);
if (!result) {
return;
}
return {
abbreviation: result.abbreviation,
filter
};
}