Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getProfileName: function() {
var view = activeView();
var profile = view.settings()['emmet.profile'] || null;
if (profile)
return profile;
var pos = this.getCaretPos();
if (view.match_selector(pos, 'text.xml'))
return 'xml';
if (view.match_selector(pos, 'text.html')) {
if (~view.substr(new sublime.Region(0, 200)).toLowerCase().indexOf('xhtml')) {
return 'xhtml';
}
return 'html';
}
return 'line';