(content: string)
| 440 | // ── Format & example ────────────────────────────────────────────── |
| 441 | |
| 442 | function detectFormatType(content: string): string { |
| 443 | if (/\[(语音中|视频中|通话结束)\|/.test(content)) return 'bracket'; |
| 444 | const tagRe = new RegExp(`<${TAG_NAME_PATTERN}+>.*</${TAG_NAME_PATTERN}+>`, 'u'); |
| 445 | if (tagRe.test(content)) return 'xml'; |
| 446 | return 'prose'; |
| 447 | } |
| 448 | |
| 449 | function extractExample(content: string): string { |
| 450 | const markers = ['生成示例:\n', '生成示例:\n', '总格式示例:\n', '总格式示例:\n']; |
no outgoing calls
no test coverage detected