Haoming 2024-09-26 09:31:43 +08:00
parent 6018ca5f99
commit aba61afc59
1 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,12 @@ class LeFormatter {
for (let i = 0; i < lines.length; i++)
lines[i] = this.#formatString(lines[i], dedupe, removeUnderscore);
textArea.value = lines.join(appendComma ? ',\n' : '\n');
if (!appendComma)
textArea.value = lines.join('\n');
else {
const val = lines.join(',\n');
textArea.value = val.replace(/\n,\n/g, "\n\n");
}
if (autoRefresh)
updateInput(textArea);