diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-21 17:25:30 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-21 17:25:30 +0700 |
| commit | 0a16fffcf59a39ace4dda15de132ad9d261f5a66 (patch) | |
| tree | fe4adbd8373db8f09005926374651d924f4f66c1 | |
| parent | cdcd8b2d559bc367969aa531f32dd1f315d8b759 (diff) | |
| download | pakakeh.ts-0a16fffcf59a39ace4dda15de132ad9d261f5a66.tar.xz | |
editor: fix paste that always add new line
| -rw-r--r-- | editor/editor.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/editor.ts b/editor/editor.ts index 1ea0438..dc58cd6 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -60,11 +60,8 @@ export class WuiEditor { break; } - if (line == "\n") { - content += line; - } else { - content += line + "\n"; - } + line = line.trimEnd(); + content += line + "\n"; }); content = content.trim(); |
