function(value, start, end) {
			// create modification range
			var r = range(start, _.isUndefined(end) ? 0 : end - start);
			var delta = value.length - r.length();
			
			var update = function(obj) {
				_.each(obj, function(v, k) {
					if (v >= r.end)
						obj[k] += delta;
				});
			};
			
			// update affected positions of current container
			update(this._positions);
			
			// update affected positions of children
			_.each(this.list(), function(item) {
				update(item._positions);
			});
			
			this.source = require('utils').replaceSubstring(this.source, value, r);
		}
function(value, start, end) {
			
			var r = range(start, _.isUndefined(end) ? 0 : end - start);
			var delta = value.length - r.length();
			
			var update = function(obj) {
				_.each(obj, function(v, k) {
					if (v >= r.end)
						obj[k] += delta;
				});
			};
			
			
			update(this._positions);
			
			
			_.each(this.list(), function(item) {
				update(item._positions);
			});
			
			this.source = require('utils').replaceSubstring(this.source, value, r);
		}
function ( value , start , end ) { // create modification range var r = range ( start , _ . isUndefined ( end ) ? 0 : end - start ) ; var delta = value . length - r . length ( ) ; var update = function ( obj ) { _ . each ( obj , function ( v , k ) { if ( v >= r . end ) obj [ k ] += delta ; } ) ; } ; // update affected positions of current container update ( this . _positions ) ; // update affected positions of children _ . each ( this . list ( ) , function ( item ) { update ( item . _positions ) ; } ) ; this . source = require ( 'utils' ) . replaceSubstring ( this . source , value , r ) ; }
Replace substring of tag's source
@param {String} value
@param {Number} start
@param {Number} end
@private
Replace substring of tag s source