eslint: Fix unicorn/prefer-regexp-test.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-01-22 17:50:13 -08:00
committed by Tim Abbott
parent a77120279d
commit a679ee12f3
2 changed files with 2 additions and 2 deletions

View File

@@ -318,7 +318,7 @@ exports.paste_handler = function (event) {
if (paste_html && page_params.development_environment) {
const text = exports.paste_handler_converter(paste_html);
const mdImageRegex = /^!\[.*]\(.*\)$/;
if (text.match(mdImageRegex)) {
if (mdImageRegex.test(text)) {
// This block catches cases where we are pasting an
// image into Zulip, which is handled by upload.js.
return;