MCPcopy Create free account
hub / github.com/Effect-TS/effect / backtickDelimiter

Function backtickDelimiter

packages/tools/api-diff/src/MigrationDoc.ts:33–39  ·  view source on GitHub ↗
(value: string, minimum: number)

Source from the content-addressed store, hash-verified

31}
32
33const backtickDelimiter = (value: string, minimum: number): string => {
34 let length = minimum
35 for (const match of value.matchAll(/`+/g)) {
36 length = Math.max(length, match[0].length + 1)
37 }
38 return "`".repeat(length)
39}
40
41const codeSpan = (value: string): string => {
42 const delimiter = backtickDelimiter(value, 1)

Callers 2

codeSpanFunction · 0.85
renderDetailedEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected