From 978eccd643cd3fa628ce7347b7e375ecabcfe9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=B1=D8=B2=D9=85=20=D8=A7=D9=84=D9=8A=D9=8E=D8=BA?= =?UTF-8?q?=D9=85=D9=8A=D8=B5=D8=A7=D8=A1?= <68658332+Al-aighumaisa@users.noreply.github.com> Date: Thu, 23 Jul 2020 02:42:42 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=82=B0=E3=81=AE=E7=A2=BA=E5=AE=9A?= =?UTF-8?q?=E6=99=82=E3=81=AB=E7=A9=BA=E7=99=BD=E6=96=87=E5=AD=97=E3=82=92?= =?UTF-8?q?=E7=BD=AE=E6=8F=9B=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #414. --- resources/assets/js/components/TagInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue index 5dd2bad..9fad41f 100644 --- a/resources/assets/js/components/TagInput.vue +++ b/resources/assets/js/components/TagInput.vue @@ -41,7 +41,7 @@ export default class TagInput extends Vue { case 'Enter': case ' ': if ((event as any).isComposing !== true) { - this.tags.push(this.buffer.trim()); + this.tags.push(this.buffer.trim().replace(/\s+/g, '_')); this.buffer = ''; } event.preventDefault(); @@ -49,7 +49,7 @@ export default class TagInput extends Vue { case 'Unidentified': // 実際にテキストボックスに入力されている文字を見に行く (フォールバック処理) if (event.srcElement && (event.srcElement as HTMLInputElement).value.slice(-1) == ' ') { - this.tags.push(this.buffer.trim()); + this.tags.push(this.buffer.trim().replace(/\s+/g, '_')); this.buffer = ''; event.preventDefault(); }