You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
296 B
TypeScript
10 lines
296 B
TypeScript
import { stripAnsi } from "../../src/terminal/ansi.js";
|
|
|
|
export function normalizeTestText(input: string): string {
|
|
return stripAnsi(input)
|
|
.replaceAll("\r\n", "\n")
|
|
.replaceAll("…", "...")
|
|
.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "?")
|
|
.replace(/[\uD800-\uDFFF]/g, "?");
|
|
}
|