MCPcopy
hub / github.com/vercel/next.js / styledStringToMarkdown

Function styledStringToMarkdown

test/development/basic/next-rs-api.test.ts:27–42  ·  view source on GitHub ↗
(styled: StyledString)

Source from the content-addressed store, hash-verified

25}
26
27function styledStringToMarkdown(styled: StyledString): string {
28 switch (styled.type) {
29 case 'text':
30 return styled.value
31 case 'strong':
32 return '**' + styled.value + '**'
33 case 'code':
34 return '`' + styled.value + '`'
35 case 'line':
36 return styled.value.map(styledStringToMarkdown).join('')
37 case 'stack':
38 return styled.value.map(styledStringToMarkdown).join('\n')
39 default:
40 throw new Error('Unknown StyledString type', styled)
41 }
42}
43
44function normalizeIssues(issues: Issue[]) {
45 return issues

Callers 1

normalizeIssuesFunction · 0.85

Calls 2

joinMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected