main
Haoming 2025-11-12 17:19:46 +08:00
parent abfd6f476c
commit ae5d7ccb51
1 changed files with 3 additions and 3 deletions

View File

@ -206,11 +206,11 @@ class LeFormatter {
static #rmUnderscore(input) {
if (!input.trim()) return "";
for (let i = 0; i < this.#cards.length; i++) input = input.replaceAll(this.#cards[i], `@TEXTUAL${i}INVERSION@`);
for (let i = 0; i < this.#cards.length; i++) input = input.replaceAll(this.#cards[i], `@T${i}I@`);
input = input.replaceAll("_", " ");
input = input.replace(/(^|[^_])_([^_]|$)/g, "$1 $2");
for (let i = 0; i < this.#cards.length; i++) input = input.replaceAll(`@TEXTUAL${i}INVERSION@`, this.#cards[i]);
for (let i = 0; i < this.#cards.length; i++) input = input.replaceAll(`@T${i}I@`, this.#cards[i]);
return input;
}