From 50133b02bd381b7ee4da1ec4b7b637d5b7552678 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 27 Apr 2023 04:08:16 +0200 Subject: Add eslint-plugin-regexp (#24361) Add [`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp) and fix discovered issues. Config is mostly the recommended one, but I relaxed a few rules. --- web_src/js/features/codeeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web_src/js/features/codeeditor.js') diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js index 40bc6d618f..f003933262 100644 --- a/web_src/js/features/codeeditor.js +++ b/web_src/js/features/codeeditor.js @@ -136,7 +136,7 @@ function togglePreviewDisplay(previewable) { if (!previewTab) return; if (previewable) { - const newUrl = (previewTab.getAttribute('data-url') || '').replace(/(.*)\/.*/i, `$1/markup`); + const newUrl = (previewTab.getAttribute('data-url') || '').replace(/(.*)\/.*/, `$1/markup`); previewTab.setAttribute('data-url', newUrl); previewTab.style.display = ''; } else { -- cgit v1.2.3