From a9fa4cf9a40c4e636772d743371163daddda159c Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Thu, 12 May 2022 00:42:29 +1000
Subject: Don't quote already-quoted common-names

---
 src/components/Tile.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/components/Tile.vue')

diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index fe60aa6..ddf2fc0 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -48,7 +48,11 @@ export default defineComponent({
 		},
 		displayName(): string {
 			if (this.tolNode.commonName != null){
-				return "'" + capitalizeWords(this.tolNode.commonName) + "'";
+				let newName = capitalizeWords(this.tolNode.commonName)
+				if (/^['"].*['"]$/.test(newName) == false){
+					newName = "'" + newName + "'";
+				}
+				return newName;
 			} else {
 				return capitalizeWords(this.layoutNode.name);
 			}
-- 
cgit v1.2.3

