Skip to content

Commit

Permalink
Allow HLJS to return multiple languages
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Dec 21, 2024
1 parent 18fd86f commit 6914554
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/password.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- SCRIPTS -->
<script src="/static/scripts/initialTheme.js?v=1"></script>
<script src="/static/scripts/utils.js?v=2"></script>
<script src="/static/scripts/utils.js?v=3"></script>
<script src="/static/scripts/themes.js?v=1" defer></script>
<script src="/static/scripts/hidecopy.js?v=1" defer></script>
<script src="/static/scripts/highlightsHTMX.js?v=5"></script>
Expand Down
2 changes: 1 addition & 1 deletion web/paste.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- SCRIPTS -->
<script src="/static/scripts/initialTheme.js?v=1"></script>
<script src="/static/scripts/utils.js?v=2"></script>
<script src="/static/scripts/utils.js?v=3"></script>
<script src="/static/scripts/themes.js?v=1" defer></script>
<script src="/static/scripts/hidecopy.js?v=1" defer></script>
<script src="/static/scripts/highlights.js?v=5" defer></script>
Expand Down
5 changes: 3 additions & 2 deletions web/static/scripts/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function getLangByName(name) {
function getLangByNameT(name) {
splat = name.split(".");
if (splat.length <= 1) {
return null
Expand All @@ -12,5 +12,6 @@ function getLangByName(name) {
}

let lname = lang.name.replace(/\s+/g, '').toLowerCase();
return lname;
let lastN = lname.split(",")[0];
return lastN;
}

0 comments on commit 6914554

Please sign in to comment.