MCPcopy Index your code
hub / github.com/tinyplex/tinybase / parseLeadingImage

Function parseLeadingImage

site/thumbnail.ts:27–30  ·  view source on GitHub ↗
(markdown: string)

Source from the content-addressed store, hash-verified

25});
26
27const parseLeadingImage = (markdown: string): Thumbnail | undefined => {
28 const match = markdown.match(new RegExp(`^${IMAGE_MARKDOWN.source}\\s*$`));
29 return match == null ? undefined : getThumbnailFromMatch(match);
30};
31
32const findFirstImage = (markdown?: string): Thumbnail | undefined => {
33 const match = markdown?.match(IMAGE_MARKDOWN);

Callers 1

splitLeadingImageFunction · 0.85

Calls 1

getThumbnailFromMatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…