aboutsummaryrefslogtreecommitdiff
path: root/src/components/Tile.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-12 00:42:29 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-12 00:42:29 +1000
commita9fa4cf9a40c4e636772d743371163daddda159c (patch)
tree922b93da113dd706c522d708a372f57f02425860 /src/components/Tile.vue
parent7b3864979f3cf9aae89d16bae708d5c3124e8e8a (diff)
Don't quote already-quoted common-names
Diffstat (limited to 'src/components/Tile.vue')
-rw-r--r--src/components/Tile.vue6
1 files changed, 5 insertions, 1 deletions
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);
}