Render with plain strings
974795
def render_string
      result = '<?xml version="1.0" encoding="UTF-8"?>' + "\n<urlset"

      XmlSitemap::MAP_SCHEMA_OPTIONS.each do |key, val|
        result << ' ' + key + '="' + val + '"'
      end

      result << ">\n"

      item_results = []
      @items.each do |item|
        item_string  = "  <url>\n"
        item_string << "    <loc>#{CGI::escapeHTML(item.target)}</loc>\n"

        # Format and image tag specifications found at http://support.google.com/webmasters/bin/answer.py?hl=en&answer=178636
        if item.image_location
          item_string << "    <image:image>\n"
          item_string << "      <image:loc>#{CGI::escapeHTML(item.image_location)}</image:loc>\n"
          item_string << "      <image:caption>#{CGI::escapeHTML(item.image_caption)}</image:caption>\n"               if item.image_caption
          item_string << "      <image:title>#{CGI::escapeHTML(item.image_title)}</image:title>\n"                     if item.image_title
          item_string << "      <image:license>#{CGI::escapeHTML(item.image_license)}</image:license>\n"               if item.image_license
          item_string << "      <image:geo_location>#{CGI::escapeHTML(item.image_geolocation)}</image:geo_location>\n" if item.image_geolocation
          item_string << "    </image:image>\n"
        end

        # Format and video tag specifications found at http://support.google.com/webmasters/bin/answer.py?hl=en&answer=80472&topic=10079&ctx=topic#2
        if item.video_thumbnail_location && item.video_title && item.video_description && (item.video_content_location || item.video_player_location)
          item_string << "    <video:video>\n"
          item_string << "      <video:thumbnail_loc>#{CGI::escapeHTML(item.video_thumbnail_location)}</video:thumbnail_loc>\n"
          item_string << "      <video:title>#{CGI::escapeHTML(item.video_title)}</video:title>\n"
          item_string << "      <video:description>#{CGI::escapeHTML(item.video_description)}</video:description>\n"
          item_string << "      <video:content_loc>#{CGI::escapeHTML(item.video_content_location)}</video:content_loc>\n"                           if item.video_content_location
          item_string << "      <video:player_loc>#{CGI::escapeHTML(item.video_player_location)}</video:player_loc>\n"                              if item.video_player_location
          item_string << "      <video:duration>#{CGI::escapeHTML(item.video_duration.to_s)}</video:duration>\n"                                    if item.video_duration
          item_string << "      <video:expiration_date>#{item.video_expiration_date_value}</video:expiration_date>\n"                               if item.video_expiration_date
          item_string << "      <video:rating>#{CGI::escapeHTML(item.video_rating.to_s)}</video:rating>\n"                                          if item.video_rating
          item_string << "      <video:view_count>#{CGI::escapeHTML(item.video_view_count.to_s)}</video:view_count>\n"                              if item.video_view_count
          item_string << "      <video:publication_date>#{item.video_publication_date_value}</video:publication_date>\n"                            if item.video_publication_date
          item_string << "      <video:family_friendly>#{CGI::escapeHTML(item.video_family_friendly)}</video:family_friendly>\n"                    if item.video_family_friendly
          item_string << "      <video:category>#{CGI::escapeHTML(item.video_category)}</video:category>\n"                                         if item.video_category
          item_string << "      <video:restriction relationship=\"allow\">#{CGI::escapeHTML(item.video_restriction)}</video:restriction>\n"         if item.video_restriction
          item_string << "      <video:gallery_loc>#{CGI::escapeHTML(item.video_gallery_location)}</video:gallery_loc>\n"                           if item.video_gallery_location
          item_string << "      <video:price currency=\"USD\">#{CGI::escapeHTML(item.video_price.to_s)}</video:price>\n"                            if item.video_price
          item_string << "      <video:requires_subscription>#{CGI::escapeHTML(item.video_requires_subscription)}</video:requires_subscription>\n"  if item.video_requires_subscription
          item_string << "      <video:uploader>#{CGI::escapeHTML(item.video_uploader)}</video:uploader>\n"                                         if item.video_uploader
          item_string << "      <video:platform relationship=\"allow\">#{CGI::escapeHTML(item.video_platform)}</video:platform>\n"                  if item.video_platform
          item_string << "      <video:live>#{CGI::escapeHTML(item.video_live)}</video:live>\n"                                                     if item.video_live
          item_string << "    </video:video>\n"
        end

        item_string << "    <lastmod>#{item.lastmod_value}</lastmod>\n"
        item_string << "    <changefreq>#{item.changefreq}</changefreq>\n" if item.changefreq
        item_string << "    <priority>#{item.priority}</priority>\n" if item.priority
        item_string << "  </url>\n"

        item_results << item_string
      end

      result << item_results.join("")
      result << "</urlset>\n"

      result
    end
976172
function render(template, vars) {
    var rendered = template;

    for (var key in vars) {
        if (vars.hasOwnProperty(key)) {
            var val = vars[key];
            var regExpString = '\\{' + key + '\\}';
            var regExp = new RegExp(regExpString, 'g');

            rendered = rendered.replace(regExp, val);
        }
    }

    return rendered;
}
1270303
function renderString(templateString, options, callback) {
  var template = builtTemplateFromString(templateString, '', options);
  return template.render({ model: options, }, callback);
}
875552
function renderList (
  val,
  render
) {
  var ret, i, l, keys, key;
  if (Array.isArray(val) || typeof val === 'string') {
    ret = new Array(val.length);
    for (i = 0, l = val.length; i < l; i++) {
      ret[i] = render(val[i], i);
    }
  } else if (typeof val === 'number') {
    ret = new Array(val);
    for (i = 0; i < val; i++) {
      ret[i] = render(i + 1, i);
    }
  } else if (isObject(val)) {
    if (hasSymbol && val[Symbol.iterator]) {
      ret = [];
      var iterator = val[Symbol.iterator]();
      var result = iterator.next();
      while (!result.done) {
        ret.push(render(result.value, ret.length));
        result = iterator.next();
      }
    } else {
      keys = Object.keys(val);
      ret = new Array(keys.length);
      for (i = 0, l = keys.length; i < l; i++) {
        key = keys[i];
        ret[i] = render(val[key], key, i);
      }
    }
  }
  if (!isDef(ret)) {
    ret = [];
  }
  (ret)._isVList = true;
  return ret
}
771576
function render (template, locals, callback) {
  var engineExt =
  engineName.charAt(0) === '.' ? engineName : ('.' + engineName)
  var tmplPath = path.join(templatesDir, template + engineExt)
  var origTmplPath = path.join(origTemplatesDir, template + engineExt)

  function renderToText (html) {
    var text = htmlToText.fromString(html, {
      wordwrap: 72 // A little less than 80 characters per line is the de-facto
    // standard for e-mails to allow for some room for quoting
    // and e-mail client UI elements (e.g. scrollbar)
    })

    callback(null, html, text)
  }

  engine(tmplPath, locals)
    .then(renderToText)
    .catch(function () {
      engine(origTmplPath, locals)
        .then(renderToText)
        .catch(function (err) {
          callback(err)
        })
    })
}
1274706
function render(text, paths) {
  return less.render.call(less, text, {
    paths: paths,
    javascriptEnabled: true,
    plugins: [new NpmImportPlugin({ prefix: '~' })]
  });
}
1210316
function renderToString(reactClass, data) {
		let classPath = path.join(viewsDir, reactClass);
		let element = React.createElement(require(classPath).default, data);
		return ReactDOMServer.renderToString(element);
	}
131376
def _render_value(self, val, context, delimiters=None):
        
        if not is_string(val):
            # In case the template is an integer, for example.
            val = self.to_str(val)
        if type(val) is not unicode:
            val = self.literal(val)
        return self.render(val, context, delimiters)
1028413
def render(format = :html, css_class = 'screen', css_style = nil)
			result = case format
			when :text
				''
			when :html
				%Q|<pre#{css_class ? %Q[ class="#{css_class}"] : ''}#{css_style ? %Q| style="#{css_style}"| : ''}>\n|
			else
				raise AnsiSysError, "Invalid format option to render: #{format.inspect}"
			end

			unless @lines.keys.empty?
				prev_sgr = nil
				max_row = @lines.keys.max
				(1..max_row).each do |row|
					if @lines.has_key?(row) and not @lines[row].keys.empty?
						col = 1
						while col <= @lines[row].keys.max
							if @lines[row].has_key?(col) and @lines[row][col]
								char, width, sgr = @lines[row][col]
								if prev_sgr != sgr
									result += prev_sgr.render(format, :postfix, @colors) if prev_sgr
									result += sgr.render(format, :prefix, @colors)
									prev_sgr = sgr
								end
								case format
								when :text
									result += char
								when :html
									result += WEBrick::HTMLUtils.escape(char)
								end
								col += width
							else
								result += ' '
								col += 1
							end
						end
					end
					result += "\n" if row < max_row
				end
				result += prev_sgr.render(format, :postfix, @colors) if prev_sgr
			end

			result += case format
			when :text
				''
			when :html
				'</pre>'
			end
			return result
		end
503255
def render_string(template_string, context, format = default_format)
      render_file(proc_template(template_string), context, format)
    end
59946
def render(self, context, request=None):
        """"""
        context['component'] = self
        return render_to_string(self.template_name, context, request)
1119818
def _render(self, contexts, partials):
        """"""
        val = self._lookup(self.value, contexts)
        if val:
            return EMPTYSTRING
        return self._render_children(contexts, partials)
490849
def render_to_string(self, *args, **kwargs):
        """"""
        try:
            template_name, args = args[0], args[1:]
        except IndexError:
            raise TypeError('name of template required')
        return self.get_template(template_name).render(*args, **kwargs)
326570
function renderAttributeString(values, context) {
  if (typeof values === 'string' || typeof values === 'boolean') {
    return values;
  }

  var buffer = '';
  var toString = new ToString();
  for (var i = 0; i < values.length; i++) {
    toString.clear();
    render(toString, values[i], context);
    buffer += toString.getOutput();
  }

  return buffer;
}
651242
function parse(str, options = {}) {
    let tokens = tokenize(str)
    let data = []

    tokens.forEach((item, idx) => {
        let [ label, token ] = item
        if (renderRules[label]) {
            data.push(renderRules[label](token))
        }else {
            data.push([ RENDER_TYPE_PLAIN, token ])
        }
    })
    return data
}
163904
def _render_str(self, string):
        """"""
        if isinstance(string, StrLabel):
            string = string._render(string.expr)
        string = str(string)
        if len(string) == 0:
            return ''
        name, supers, subs = split_super_sub(string)
        return render_unicode_sub_super(
            name, subs, supers, sub_first=True, translate_symbols=True,
            unicode_sub_super=self._settings['unicode_sub_super'])
1340330
def render(self, datestring):
        """"""
        formats = ["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%d %H:%M:%S.%f",
                   "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d %H:%M:%S"]
        if datestring:
            for format in formats:
                try:
                    parsed = datetime.strptime(datestring, format)
                    if not timezone.is_aware(parsed):
                        parsed = timezone.make_aware(parsed, timezone.utc)
                    return parsed
                except Exception:
                    pass
        return None