chore(utils): add iconSource API to Emoji

This commit is contained in:
Patryk Osmaczko 2022-07-22 17:41:09 +02:00 committed by Michał Cieślak
parent 8fa740b12a
commit 3df86befad

View File

@ -43,6 +43,11 @@ QtObject {
} }
}) })
} }
function iconSource(text) {
const parsed = parse(text);
const match = parsed.match('src="(.*\.svg).*"');
return (match && match.length >= 2) ? match[1] : undefined;
}
function iconId(text) { function iconId(text) {
const parsed = parse(text); const parsed = parse(text);
const match = parsed.match('src=".*\/(.+?).svg'); const match = parsed.match('src=".*\/(.+?).svg');