Skip to content

Commit

Permalink
refactor(code view): convert custom language file from JS to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Oct 17, 2024
1 parent 467e576 commit 38c5a70
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 838 deletions.
153 changes: 0 additions & 153 deletions src/common/highlight/bash.js

This file was deleted.

14 changes: 14 additions & 0 deletions src/common/highlight/bash.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import bash from 'highlight.js/lib/languages/bash'
import { isString } from 'lodash'

export default (hljs: any) => {
const ret = bash?.(hljs)
if (ret?.keywords?.built_in && isString(ret.keywords.built_in)) {
ret.keywords.built_in = ret.keywords.built_in.replace(
'read readarray source type typeset ulimit unalias ',
($0: string) => `${$0}docker tar wget `,
)
}

return ret
}
Loading

0 comments on commit 38c5a70

Please sign in to comment.