Wrap placeholders with scobes
196892
function wrapPlaceholders(placeholders) {
  const keys = Object.keys(placeholders);
  const wrappedPlaceholders = {};

  for (let i = 0; i < keys.length; i++) {
    wrappedPlaceholders['<'+keys[i]+'>'] = placeholders[keys[i]];
  }

  return wrappedPlaceholders;
}
1141456
function insertContentIntoPlaceholder(node, content) {
	const state = {replaced: false};

	node.value = replacePlaceholder(node.value, content, state);
	node.attributes.forEach(attr => {
		if (attr.value) {
			node.setAttribute(attr.name, replacePlaceholder(attr.value, content, state));
		}
	});

	return state.replaced;
}
336951
def _create_placeholders(self, n_features):
        
        self.input_data = tf.placeholder(tf.float32, [None, n_features],
                                         name='x-input')
        self.hrand = tf.placeholder(tf.float32, [None, self.num_hidden],
                                    name='hrand')
        self.vrand = tf.placeholder(tf.float32, [None, n_features],
                                    name='vrand')
        # not used in this model, created just to comply with
        # unsupervised_model.py
        self.input_labels = tf.placeholder(tf.float32)
        self.keep_prob = tf.placeholder(tf.float32, name='keep-probs')
1138911
def message_with_placeholders(message):
    
    new_message = message.copy()
    for attr in PLACEHOLDER_FORMAT.keys():
        if message.get(attr) is not None:
            content = message[attr]
            placeholder = PLACEHOLDER_FORMAT[attr].format(length=len(content))
            new_message[attr] = placeholder
    return new_message
277070
function wrap(str, dollarName, doneName) {
  return doneName ?
    '(function(' + dollarName + ', ' + doneName + ', undefined){' + str + '})(artoo.$, artoo.done);' :
    '(function(' + dollarName + ', undefined){' + str + '})(artoo.$);';
}
746119
def replace_placeholders(path: Path, properties: Dict[str, str]):
    ''''''

    with open(path, encoding='utf8') as file:
        file_content = Template(file.read())

    with open(path, 'w', encoding='utf8') as file:
        file.write(file_content.safe_substitute(properties))
975760
function ($placeholder) {
			$.fn.mediumInsert.insert.deselect();


			var formHtml = '<div class="medium-editor-toolbar medium-editor-toolbar-active medium-editor-toolbar-form-anchor mediumInsert-embedsWire" style="display: block;"><input type="text" value="" placeholder="' + this.options.urlPlaceholder + '" class="mediumInsert-embedsText medium-editor-toolbar-anchor-input"></div>';
			$(formHtml).appendTo($placeholder.prev());
			setTimeout(function () {
				$placeholder.prev().find('input').focus();
			}, 50);

			$.fn.mediumInsert.insert.deselect();

			this.currentPlaceholder = $placeholder;
			$(".mediumInsert-embedsText").focus();
		}
675583
private function extractPlaceholders(): void
  {
    $unknown = [];

    preg_match_all('(@[A-Za-z0-9\_\.]+(\%type)?@)', $this->routineSourceCode, $matches);
    if (!empty($matches[0]))
    {
      foreach ($matches[0] as $placeholder)
      {
        if (isset($this->replacePairs[strtoupper($placeholder)]))
        {
          $this->replace[$placeholder] = $this->replacePairs[strtoupper($placeholder)];
        }
        else
        {
          $unknown[] = $placeholder;
        }
      }
    }

    $this->logUnknownPlaceholders($unknown);
  }
176363
def _create_placeholders(self):
        """"""
        self.input_data = tf.placeholder(
            tf.int32, [self.batch_size, self.num_steps])
        self.input_labels = tf.placeholder(
            tf.int32, [self.batch_size, self.num_steps])
73964
function wrapValues (values, objtypes) {
  var result = [];
  for(var i=0; i < objtypes.length; i++) result.push(wrapValue(values[i], objtypes[i]));
  return result;
}
159414
function placeholder (model, name, spec) {
    // if colum is id then needs to be wrapped in UNHEX
    if (spec.type === 'id' && model.binaryIds) {
        return `UNHEX(:${name})`
    }
    // if column is data and compression is in use it is hex
    else if (spec.type === 'data' && model.compression) {
        return `FROM_BASE64(:${name})`
    }
    else {
        return `:${name}`
    }
}
461329
def _placeholders_recursif(nodelist, plist, blist):
    """"""
    # I needed to do this lazy import to compile the documentation
    from django.template.loader_tags import BlockNode

    if len(blist):
        block = blist[-1]
    else:
        block = None

    for node in nodelist:

        if isinstance(node, BlockNode):
            if node not in blist:
                blist.append(node)
            if not block:
                block = node

        if block:
            if isinstance(node, template.base.VariableNode):
                if(node.filter_expression.var.var == u'block.super'):
                    block.has_super_var = True

        # extends node?
        if hasattr(node, 'parent_name'):
            # I do not know why I did this... but the tests are guarding it
            dummy_context2 = Context()
            dummy_context2.template = template.Template("")
            _placeholders_recursif(node.get_parent(dummy_context2).nodelist,
                                   plist, blist)
        # include node?
        elif hasattr(node, 'template') and hasattr(node.template, 'nodelist'):
            _placeholders_recursif(node.template.nodelist, plist, blist)

        # Is it a placeholder?
        if hasattr(node, 'page') and hasattr(node, 'parsed') and \
                hasattr(node, 'as_varname') and hasattr(node, 'name') \
                and hasattr(node, 'section'):
            if block:
                node.found_in_block = block
            plist.append(node)
            node.render(dummy_context)

        for key in ('nodelist', 'nodelist_true', 'nodelist_false'):

            if hasattr(node, key):
                try:
                    _placeholders_recursif(getattr(node, key), plist, blist)
                except:
                    pass
86706
private void prepTemplatePlaceholders(Node fn) {
    final List<String> locals = templateLocals;
    final List<String> params = templateParams;
    final Map<String, JSType> paramTypes = new HashMap<>();

    // drop the function name so it isn't include in the name maps
    String fnName = fn.getFirstChild().getString();
    fn.getFirstChild().setString("");

    // Build a list of parameter names and types.
    Node templateParametersNode = fn.getSecondChild();
    JSDocInfo info = NodeUtil.getBestJSDocInfo(fn);
    if (templateParametersNode.hasChildren()) {
      Preconditions.checkNotNull(info,
          "Missing JSDoc declaration for template function %s", fnName);
    }
    for (Node paramNode : templateParametersNode.children()) {
      String name = paramNode.getString();
      JSTypeExpression expression = info.getParameterType(name);
      Preconditions.checkNotNull(expression,
          "Missing JSDoc for parameter %s of template function %s",
          name, fnName);
      JSType type = typeRegistry.evaluateTypeExpressionInGlobalScope(expression);
      checkNotNull(type);
      params.add(name);
      paramTypes.put(name, type);
    }

    // Find references to string literals, local variables and parameters and replace them.
    traverse(
        fn,
        new Visitor() {
          @Override
          public void visit(Node n) {
            if (n.isName()) {
              Node parent = n.getParent();
              String name = n.getString();
              if (!name.isEmpty() && parent.isVar() && !locals.contains(name)) {
                locals.add(n.getString());
              }

              if (params.contains(name)) {
                JSType type = paramTypes.get(name);
                boolean isStringLiteral =
                    type.isStringValueType() && name.startsWith("string_literal");
                replaceNodeInPlace(
                    n, createTemplateParameterNode(params.indexOf(name), type, isStringLiteral));
              } else if (locals.contains(name)) {
                replaceNodeInPlace(n, createTemplateLocalNameNode(locals.indexOf(name)));
              }
            }
          }
        });
  }
275248
function wrap(obj, opts) {
  var result = {};
  for (var key in obj) {
    if(obj.hasOwnProperty(key)) {
      var wrapped = wrap1(obj[key], opts, key);
      if (typeof wrapped !== 'undefined')
        result[key] = wrapped;
    }
  }
  return result;
}
535350
function wrapper(node, schema) {

    // NODES['*'] = xtend(NODES['*'], schema.NODES['*']);
    // delete schema.NODES;

    var ctx = {type: 'root', children: []}
    var replace

    if (!node || typeof node !== 'object' || !node.type) {
        return ctx
    }

    replace = one(xtend(defaults, schema || {}), node, [])

    if (!replace) {
        return ctx
    }

    if ('length' in replace) {
        if (replace.length === 1) {
            return replace[0]
        }

        ctx.children = replace

        return ctx
    }

    return replace
}
703782
function maybeAddEmptyStringAtEnd(elements, items) {
  let length = elements.length;
  if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION) {
    items.push(createStringLiteralExpression(null, '""'));
  }
}
1082064
function wrap(content, scope) {
  const scopeParams = Object.keys(scope).join(',');
  const comma = ((scopeParams !== '')?', ':'');
  return `(function (exports, require, module, __filename, __dirname${comma}${scopeParams}) {
    ${content}
  });`
}