chore: generate
This commit is contained in:
parent
2d2f587bfa
commit
68676f2c5c
2 changed files with 2 additions and 7 deletions
|
|
@ -27,8 +27,5 @@ export function expandTrackedPastedText(text: string, ranges: { start: number; e
|
||||||
return ranges
|
return ranges
|
||||||
.slice()
|
.slice()
|
||||||
.sort((a, b) => b.start - a.start)
|
.sort((a, b) => b.start - a.start)
|
||||||
.reduce(
|
.reduce((result, part) => displaySlice(result, 0, part.start) + part.text + displaySlice(result, part.end), text)
|
||||||
(result, part) => displaySlice(result, 0, part.start) + part.text + displaySlice(result, part.end),
|
|
||||||
text,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,7 @@ describe("prompt part", () => {
|
||||||
text: "public:\n\tvoid ExecuteTask();\nprivate:",
|
text: "public:\n\tvoid ExecuteTask();\nprivate:",
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
).toBe(
|
).toBe("你好你好\npublic:\n\tvoid ExecuteTask();\nprivate:\n阿斯顿法国红酒看来")
|
||||||
"你好你好\npublic:\n\tvoid ExecuteTask();\nprivate:\n阿斯顿法国红酒看来",
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test("expandTrackedPastedText only expands the tracked placeholder occurrence", () => {
|
test("expandTrackedPastedText only expands the tracked placeholder occurrence", () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue