How to use the emmet/utils/common.splitByLines 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 / brackets-emmet / interactive.js View on Github external
function lineDelta(prev, cur) {
		return utils.splitByLines(cur).length - utils.splitByLines(prev).length;
	}
github emmetio / brackets-emmet / editor.js View on Github external
});
			value = tabstopData.text;

			var firstTabStop = tabstopData.tabstops[0] || {start: value.length, end: value.length};
			firstTabStop.start += start;
			firstTabStop.end += start;

			var doc = this.editor.document;
			start = this._posFromIndex(start);
			end = this._posFromIndex(end);

			var oldValue = doc.getRange(start, end);

			doc.replaceRange(value, start, end);
			this.createSelection(firstTabStop.start, firstTabStop.end);
			this._saveSelection(utils.splitByLines(value).length - utils.splitByLines(oldValue).length);
			return value;
		},