| 119 | // ===== 逐行渲染子组件 ===== |
| 120 | |
| 121 | interface CodeLineProps { |
| 122 | tokens: HighlightToken[] |
| 123 | /** 该行的原始文本(token 未覆盖部分作为 fallback) */ |
| 124 | rawLine: string |
| 125 | } |
| 126 | |
| 127 | /** 单行代码渲染(memo 避免已稳定行重复渲染) */ |
| 128 | const CodeLine = React.memo(function CodeLine({ tokens, rawLine }: CodeLineProps): React.ReactElement { |
nothing calls this directly
no outgoing calls
no test coverage detected