From 620e1b44f67eff09936d596c82a282b19b526661 Mon Sep 17 00:00:00 2001 From: Eviee Py Date: Wed, 31 Jul 2024 22:47:45 +1000 Subject: [PATCH] Fix HLJS returning an unusable name with Lang detection. --- web/password.html | 2 +- web/paste.html | 2 +- web/static/scripts/utils.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/password.html b/web/password.html index 4b78f49..e7e187d 100644 --- a/web/password.html +++ b/web/password.html @@ -17,7 +17,7 @@ - + diff --git a/web/paste.html b/web/paste.html index 20fd22e..166d828 100644 --- a/web/paste.html +++ b/web/paste.html @@ -16,7 +16,7 @@ - + diff --git a/web/static/scripts/utils.js b/web/static/scripts/utils.js index 0ac8b22..7c8c142 100644 --- a/web/static/scripts/utils.js +++ b/web/static/scripts/utils.js @@ -10,5 +10,7 @@ function getLangByName(name) { if (!lang) { return null } - return lang.name; + + let lname = lang.name.replace(/\s+/g, '').toLowerCase(); + return lname; } \ No newline at end of file