in library/markdown-parser/models/article.ts [169:181]
function getThumbnail(tokensList: ExtendTokensList): string | null {
let imageUrl: string | null = null;
tokensList.forEach(token => {
if (!imageUrl) {
if (token.type === 'image' && token.href) {
imageUrl = token.href;
} else if (token.tokens) {
imageUrl = getThumbnail(token.tokens);
}
}
});
return imageUrl;
}