|
|
@ -300,14 +300,14 @@ const unfold = (f, seed) => {
|
|
|
|
}`
|
|
|
|
}`
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
|
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
|
|
|
const required = []
|
|
|
|
const alreadyLoaded = new Set()
|
|
|
|
|
|
|
|
|
|
|
|
LANGUAGES.filter(language => language.mode !== 'auto').forEach(language => {
|
|
|
|
LANGUAGES.filter(language => language.mode !== 'auto').forEach(language => {
|
|
|
|
if (language.mode && required.indexOf(language.mode) === -1) {
|
|
|
|
if (language.mode && !alreadyLoaded.has(language.mode)) {
|
|
|
|
required.push(language.mode)
|
|
|
|
alreadyLoaded.add(language.mode)
|
|
|
|
!language.custom
|
|
|
|
language.custom
|
|
|
|
? require(`codemirror/mode/${language.mode}/${language.mode}`)
|
|
|
|
? require(`./customModes/${language.mode}`)
|
|
|
|
: require(`./customModes/${language.mode}`)
|
|
|
|
: require(`codemirror/mode/${language.mode}/${language.mode}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|