Skip to content

Commit 6914554

Browse files
committed
Allow HLJS to return multiple languages
1 parent 18fd86f commit 6914554

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

web/password.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<!-- SCRIPTS -->
1919
<script src="/static/scripts/initialTheme.js?v=1"></script>
20-
<script src="/static/scripts/utils.js?v=2"></script>
20+
<script src="/static/scripts/utils.js?v=3"></script>
2121
<script src="/static/scripts/themes.js?v=1" defer></script>
2222
<script src="/static/scripts/hidecopy.js?v=1" defer></script>
2323
<script src="/static/scripts/highlightsHTMX.js?v=5"></script>

web/paste.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!-- SCRIPTS -->
1818
<script src="/static/scripts/initialTheme.js?v=1"></script>
19-
<script src="/static/scripts/utils.js?v=2"></script>
19+
<script src="/static/scripts/utils.js?v=3"></script>
2020
<script src="/static/scripts/themes.js?v=1" defer></script>
2121
<script src="/static/scripts/hidecopy.js?v=1" defer></script>
2222
<script src="/static/scripts/highlights.js?v=5" defer></script>

web/static/scripts/utils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function getLangByName(name) {
1+
function getLangByNameT(name) {
22
splat = name.split(".");
33
if (splat.length <= 1) {
44
return null
@@ -12,5 +12,6 @@ function getLangByName(name) {
1212
}
1313

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

0 commit comments

Comments
 (0)