MCPcopy
hub / github.com/InternLM/MindSearch / replaceStr

Function replaceStr

frontend/React/src/utils/tools.ts:19–24  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

17};
18
19export const replaceStr = (str: string) => {
20 return str.replace(/\[\[(\d+)\]\]/g, (match: any, number: any) => {
21 // 创建一个带有class为'fnn2'的span元素,并将数字作为文本内容
22 return `<i class='f'>${number}</i>`;
23 });
24};

Callers 3

ChatRightFunction · 0.90
AnswerFunction · 0.90
formatDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected