Skip to content

Commit

Permalink
Fix HLJS returning an unusable name with Lang detection. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy authored Jul 31, 2024
1 parent bed0a68 commit a609133
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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"></script>
<script src="/static/scripts/utils.js?v=2"></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"></script>
<script src="/static/scripts/utils.js?v=2"></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
4 changes: 3 additions & 1 deletion web/static/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ function getLangByName(name) {
if (!lang) {
return null
}
return lang.name;

let lname = lang.name.replace(/\s+/g, '').toLowerCase();
return lname;
}

0 comments on commit a609133

Please sign in to comment.