lib/parser/processor/pastedContent.js
function insertPastedContent(node, content, overwrite) {
		var nodesWithPlaceholders = node.findAll(function(item) {
			return hasOutputPlaceholder(item);
		});
		
		if (hasOutputPlaceholder(node))
			nodesWithPlaceholders.unshift(node);
		
		if (nodesWithPlaceholders.length) {
			nodesWithPlaceholders.forEach(function(item) {
				item.content = replaceOutputPlaceholders(item.content, content);
				item._attributes.forEach(function(attr) {
					attr.value = replaceOutputPlaceholders(attr.value, content);
				});
			});
		} else {
			// on output placeholders in subtree, insert content in the deepest
			// child node
			var deepest = node.deepestChild() || node;
			if (overwrite) {
				deepest.content = content;
			} else {
				deepest.content = abbrUtils.insertChildContent(deepest.content, content);
			}
		}
	}
function insertPastedContent(node, content, overwrite) {
		var nodesWithPlaceholders = node.findAll(function(item) {
			return hasOutputPlaceholder(item);
		});
		
		if (hasOutputPlaceholder(node))
			nodesWithPlaceholders.unshift(node);
		
		if (nodesWithPlaceholders.length) {
			nodesWithPlaceholders.forEach(function(item) {
				item.content = replaceOutputPlaceholders(item.content, content);
				item._attributes.forEach(function(attr) {
					attr.value = replaceOutputPlaceholders(attr.value, content);
				});
			});
		} else {
			// on output placeholders in subtree, insert content in the deepest
			// child node
			var deepest = node.deepestChild() || node;
			if (overwrite) {
				deepest.content = content;
			} else {
				deepest.content = abbrUtils.insertChildContent(deepest.content, content);
			}
		}
	}
function insertPastedContent ( node , content , overwrite ) { var nodesWithPlaceholders = node . findAll ( function ( item ) { return hasOutputPlaceholder ( item ) ; } ) ; if ( hasOutputPlaceholder ( node ) ) nodesWithPlaceholders . unshift ( node ) ; if ( nodesWithPlaceholders . length ) { nodesWithPlaceholders . forEach ( function ( item ) { item . content = replaceOutputPlaceholders ( item . content , content ) ; item . _attributes . forEach ( function ( attr ) { attr . value = replaceOutputPlaceholders ( attr . value , content ) ; } ) ; } ) ; } else { // on output placeholders in subtree, insert content in the deepest // child node var deepest = node . deepestChild ( ) || node ; if ( overwrite ) { deepest . content = content ; } else { deepest . content = abbrUtils . insertChildContent ( deepest . content , content ) ; } } }
Insert pasted content into correct positions of parsed node
@param {AbbreviationNode} node
@param {String} content
@param {Boolean} overwrite Overwrite node content if no value placeholders
found instead of appending to existing content
Insert pasted content into correct positions of parsed node