Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

eslint: Fix unicorn/prefer-string-replace-all.

Anders Kaseorgb42f34709e8d
diff --git a/web/src/compose_paste.ts b/web/src/compose_paste.ts
index 71debbee8bc..82c5721f6a3 100644
--- a/web/src/compose_paste.ts
+++ b/web/src/compose_paste.ts
@@ -352,7 +352,7 @@ export function paste_handler_converter(
content = content
.replace(/^\n+/, "") // remove leading newlines
.replace(/\n+$/, "\n") // replace trailing newlines with just a single one
- .replaceAll(/\n/gm, "\n "); // custom 2 space indent
+ .replaceAll("\n", "\n "); // custom 2 space indent
let prefix = "* ";
const parent = node.parentElement;
assert(parent !== null);