MCPcopy Create free account
hub / github.com/andylow92/file-system-like-github / stripCode

Function stripCode

packages/shared/src/markdown.ts:128–130  ·  view source on GitHub ↗

* Remove fenced (``` ```) and inline (`` ` ``) code so tags/links inside code * are not extracted as real tags/links.

(text: string)

Source from the content-addressed store, hash-verified

126 * are not extracted as real tags/links.
127 */
128function stripCode(text: string): string {
129 return text.replace(/```[\s\S]*?```/g, '').replace(/`[^`\n]*`/g, '');
130}
131
132/**
133 * Parse a leading YAML frontmatter block (minimal subset). Returns the document

Callers 2

extractWikilinksFunction · 0.85
extractTagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected