From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 4/6] Remove useless escapes
Date: Tue, 18 May 2021 14:12:16 +0200 [thread overview]
Message-ID: <20210518121218.125661-5-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20210518121218.125661-1-d.jaeger@proxmox.com>
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
www/manager6/lxc/DNS.js | 2 +-
www/manager6/qemu/CloudInit.js | 2 +-
www/manager6/qemu/USBEdit.js | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index f277370c..6c519023 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -13,7 +13,7 @@ Ext.define('PVE.lxc.DNSInputPanel', {
}
if (values.nameserver) {
- var list = values.nameserver.split(/[\ \,\;]+/);
+ let list = values.nameserver.split(/[ ,;]+/);
values.nameserver = list.join(' ');
} else if (!me.insideWizard) {
deletes.push('nameserver');
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 8465b402..77ff93d4 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -86,7 +86,7 @@ Ext.define('PVE.qemu.CloudInit', {
var insert_params = {};
let disk = PVE.Parser.parseQemuDrive(view.ciDriveId, view.ciDrive);
var storage = '';
- var stormatch = disk.file.match(/^([^\:]+)\:/);
+ var stormatch = disk.file.match(/^([^:]+):/);
if (stormatch) {
storage = stormatch[1];
}
diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js
index 6a8b93bd..a2204584 100644
--- a/www/manager6/qemu/USBEdit.js
+++ b/www/manager6/qemu/USBEdit.js
@@ -149,11 +149,11 @@ Ext.define('PVE.qemu.USBEdit', {
var type = 'spice';
for (let i = 0; i < data.length; i++) {
- if (/^(host=)?(0x)?[a-zA-Z0-9]{4}\:(0x)?[a-zA-Z0-9]{4}$/.test(data[i])) {
+ if (/^(host=)?(0x)?[a-zA-Z0-9]{4}:(0x)?[a-zA-Z0-9]{4}$/.test(data[i])) {
hostdevice = data[i];
hostdevice = hostdevice.replace('host=', '').replace('0x', '');
type = 'hostdevice';
- } else if (/^(host=)?(\d+)\-(\d+(\.\d+)*)$/.test(data[i])) {
+ } else if (/^(host=)?(\d+)-(\d+(\.\d+)*)$/.test(data[i])) {
port = data[i];
port = port.replace('host=', '');
type = 'port';
--
2.20.1
next prev parent reply other threads:[~2021-05-18 12:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 12:12 [pve-devel] [PATCH manager 0/6] eslint fixes Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 1/6] Fix usage of 'me' Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 2/6] No unused or duplicate variables Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 3/6] Functions may not be completely empty Dominic Jäger
2021-05-18 12:12 ` Dominic Jäger [this message]
2021-05-18 12:12 ` [pve-devel] [PATCH manager 5/6] State equalities more precisely Dominic Jäger
2021-05-18 12:12 ` [pve-devel] [PATCH manager 6/6] Miscellaneous eslint fixes Dominic Jäger
2021-05-18 13:23 ` [pve-devel] applied-series: [PATCH manager 0/6] " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210518121218.125661-5-d.jaeger@proxmox.com \
--to=d.jaeger@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox