重构: tool_registry拆分及多批改进
This commit is contained in:
@@ -16,7 +16,7 @@ export function stripMd(text: string | null | undefined): string {
|
||||
return text
|
||||
.replace(/!\[([^\]]*)\]\([^)]*\)/g, '$1') // 图片 alt
|
||||
.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1') // 链接文本
|
||||
.replace(/```[a-zA-Z]*\n?/g, '') // 代码块围栏开
|
||||
.replace(/```[^\n]*\n?/g, '') // 代码块围栏开(含任意 infostring 至换行,如 rust,norun)
|
||||
.replace(/```/g, '') // 代码块围栏闭
|
||||
.replace(/`([^`]+)`/g, '$1') // 行内代码
|
||||
.replace(/^\s{0,3}>\s?/gm, '') // 引用
|
||||
|
||||
Reference in New Issue
Block a user