MCPcopy Create free account
hub / github.com/MaxMiksa/Gravity / getDisplayName

Function getDisplayName

packages/ui/src/code-block/CodeBlock.tsx:96–100  ·  view source on GitHub ↗

获取语言显示名称,未匹配的自动首字母大写

(lang: string)

Source from the content-addressed store, hash-verified

94
95/** 获取语言显示名称,未匹配的自动首字母大写 */
96function getDisplayName(lang: string): string {
97 if (!lang) return 'Code'
98 const key = lang.toLowerCase()
99 return DISPLAY_NAMES[key] ?? key.charAt(0).toUpperCase() + key.slice(1)
100}
101
102// ===== SVG 图标路径常量 =====
103

Callers 1

CodeBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected