MCPcopy Create free account
hub / github.com/dailydotdev/apps / looksLikeMarkdown

Function looksLikeMarkdown

packages/shared/src/lib/markdown.ts:11–12  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

9 /(^|\n)\s{0,3}(#{1,6}\s|[-*]\s|\d+\.\s|```)|\[[^\]]+\]\([^)]+\)|!\[[^\]]*]\([^)]+\)|`[^`]+`|\*\*[^*]+\*\*|~~[^~]+~~/;
10
11export const looksLikeMarkdown = (value: string): boolean =>
12 markdownSyntaxRegex.test(value);
13
14/**
15 * Checks if the selected text is already within a markdown link structure

Callers 3

RichTextInputFunction · 0.90
markdown.spec.tsFile · 0.90
markdown.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected