Skip to content

Commit bc1e837

Browse files
committed
Set alias to stylus mode inof
1 parent 95321e3 commit bc1e837

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

browser/lib/customMeta.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import CodeMirror from 'codemirror'
22
import 'codemirror-mode-elixir'
33

4-
CodeMirror.modeInfo.push({name: 'Stylus', mime: 'text/x-styl', mode: 'stylus', ext: ['styl'], alias: ['styl']})
4+
const stylusCodeInfo = CodeMirror.modeInfo.find(info => info.name === 'Stylus')
5+
if (stylusCodeInfo == null) {
6+
CodeMirror.modeInfo.push({name: 'Stylus', mime: 'text/x-styl', mode: 'stylus', ext: ['styl'], alias: ['styl']})
7+
} else {
8+
stylusCodeInfo.alias = ['styl']
9+
}
510
CodeMirror.modeInfo.push({name: 'Elixir', mime: 'text/x-elixir', mode: 'elixir', ext: ['ex']})

0 commit comments

Comments
 (0)