@@ -137,8 +137,12 @@ export function getSnippet(body: Content[]): { image: string, content: string }
137 const image = body.filter((c: Content): c is UrlContent => 'url' in c && IMAGE_REGEX.test(c.url)).map(c => c.url)[0] || '';
137 const image = body.filter((c: Content): c is UrlContent => 'url' in c && IMAGE_REGEX.test(c.url)).map(c => c.url)[0] || '';
138 const content = removeMd(firstContent.replace(/!\[.*\]\((.*)\)\s*/g, ''));
138 const content = removeMd(firstContent.replace(/!\[.*\]\((.*)\)\s*/g, ''));
139 const end = content.length > 256 ? 253 : content.length;
139 const end = content.length > 256 ? 253 : content.length;
140− const start = content.substring(0, end);
140+ let start = content.substring(0, end);
141−
141+ const length = new Blob([start]).size;
143+ start = start.substring(0, end - (length - end))
143 content: start === content ? start : `${start}...`,
147 content: start === content ? start : `${start}...`,
144 image: getImage(firstContent) || image
148 image: getImage(firstContent) || image