How to use the emmet.profile function in emmet

To help you get started, we’ve selected a few emmet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emmetio / emmet / plugins / sublime-text2 / editor.js View on Github external
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';