debian-mirror-gitlab/app/assets/javascripts/lib/utils/ace_utils.js
2018-12-13 13:39:08 +05:30

6 lines
172 B
JavaScript

/* global ace */
export default function getModeByFileExtension(path) {
const modelist = ace.require('ace/ext/modelist');
return modelist.getModeForPath(path).mode;
}