Skip to content

Commit

Permalink
refactor: slice + index access
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Nov 15, 2023
1 parent 69e205b commit ba4cef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => ({
const hljsLangIndex = id.indexOf(hljsLangs)
if (id.includes(hljsLangs)) {
// hljsは適当に二つに分割する
const firstLetter = id.slice(hljsLangIndex + hljsLangs.length)[0]
const firstLetter = id[hljsLangIndex + hljsLangs.length]
if (firstLetter < 'i') {
return 'hljs'
}
Expand Down

0 comments on commit ba4cef7

Please sign in to comment.