MCPcopy Create free account
hub / github.com/chainjet/platform / stripMarkdownSync

Function stripMarkdownSync

libs/common/src/utils/string.utils.ts:40–49  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

38}
39
40export function stripMarkdownSync(str: string): string {
41 // A @ is added at the beginning and then removed before returning, as a work around for an open issue:
42 // https://github.com/remarkjs/strip-markdown/issues/19
43 return remark()
44 .use(strip)
45 .processSync('@' + str)
46 .toString()
47 .trim()
48 .substr(1)
49}
50
51export function addEllipsis(str: string, maxLength: number): string {
52 if (str.length > maxLength) {

Callers 3

removeSchemaMarkdownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected