lib/action/expandAbbreviation.js
function findAbbreviation(editor) {
		var r = range(editor.getSelectionRange());
		var content = String(editor.getContent());
		if (r.length()) {
			// abbreviation is selected by user
			return r.substring(content);
		}
		
		// search for new abbreviation from current caret position
		var curLine = editor.getCurrentLineRange();
		return actionUtils.extractAbbreviation(content.substring(curLine.start, r.start));
	}
function findAbbreviation(editor) {
		var r = range(editor.getSelectionRange());
		var content = String(editor.getContent());
		if (r.length()) {
			// abbreviation is selected by user
			return r.substring(content);
		}
		
		// search for new abbreviation from current caret position
		var curLine = editor.getCurrentLineRange();
		return actionUtils.extractAbbreviation(content.substring(curLine.start, r.start));
	}
function findAbbreviation ( editor ) { var r = range ( editor . getSelectionRange ( ) ) ; var content = String ( editor . getContent ( ) ) ; if ( r . length ( ) ) { // abbreviation is selected by user return r . substring ( content ) ; } // search for new abbreviation from current caret position var curLine = editor . getCurrentLineRange ( ) ; return actionUtils . extractAbbreviation ( content . substring ( curLine . start , r . start ) ) ; }
Search for abbreviation in editor from current caret position
@param {IEmmetEditor} editor Editor instance
@return {String}
Search for abbreviation in editor from current caret position