lib/assets/tabStops.js
function(text, node, type) {
			var maxNum = 0;
			var that = this;
			
			var tsOptions = {
				tabstop: function(data) {
					var group = parseInt(data.group, 10);
					if (group === 0)
						return '${0}';
					
					if (group > maxNum) maxNum = group;
					if (data.placeholder) {
						// respect nested placeholders
						var ix = group + tabstopIndex;
						var placeholder = that.processText(data.placeholder, tsOptions);
						return '${' + ix + ':' + placeholder + '}';
					} else {
						return '${' + (group + tabstopIndex) + '}';
					}
				}
			};
			
			// upgrade tabstops
			text = this.processText(text, tsOptions);
			
			// resolve variables
			text = this.replaceVariables(text, this.variablesResolver(node));
			
			tabstopIndex += maxNum + 1;
			return text;
		}
function(text, node, type) {
			var maxNum = 0;
			var that = this;
			
			var tsOptions = {
				tabstop: function(data) {
					var group = parseInt(data.group, 10);
					if (group === 0)
						return '${0}';
					
					if (group > maxNum) maxNum = group;
					if (data.placeholder) {
						// respect nested placeholders
						var ix = group + tabstopIndex;
						var placeholder = that.processText(data.placeholder, tsOptions);
						return '${' + ix + ':' + placeholder + '}';
					} else {
						return '${' + (group + tabstopIndex) + '}';
					}
				}
			};
			
			// upgrade tabstops
			text = this.processText(text, tsOptions);
			
			// resolve variables
			text = this.replaceVariables(text, this.variablesResolver(node));
			
			tabstopIndex += maxNum + 1;
			return text;
		}
function ( text , node , type ) { var maxNum = 0 ; var that = this ; var tsOptions = { tabstop : function ( data ) { var group = parseInt ( data . group , 10 ) ; if ( group === 0 ) return '${0}' ; if ( group > maxNum ) maxNum = group ; if ( data . placeholder ) { // respect nested placeholders var ix = group + tabstopIndex ; var placeholder = that . processText ( data . placeholder , tsOptions ) ; return '${' + ix + ':' + placeholder + '}' ; } else { return '${' + ( group + tabstopIndex ) + '}' ; } } } ; // upgrade tabstops text = this . processText ( text , tsOptions ) ; // resolve variables text = this . replaceVariables ( text , this . variablesResolver ( node ) ) ; tabstopIndex += maxNum + 1 ; return text ; }
Output processor for abbreviation parser that will upgrade tabstops
of parsed node in order to prevent tabstop index conflicts
Output processor for abbreviation parser that will upgrade tabstops of parsed node in order to prevent tabstop index conflicts