Render markdown over a given value, optionally using varios extensions.

    Default extensions could be defined which MARKDOWN_EXTENSIONS option.

    :returns: A rendered markdown
555958
def markdown(value, extensions=settings.MARKDOWN_EXTENSIONS,
             extension_configs=settings.MARKDOWN_EXTENSION_CONFIGS,
             safe=False):
    
    return mark_safe(markdown_module.markdown(
        force_text(value), extensions=extensions,
        extension_configs=extension_configs, safe_mode=safe))
945178
def render(self, context):
        """"""

        content = mark_safe(self.get_content_from_context(context))
        if not content:
            return ''
        if self.parsed:
            try:
                t = template.Template(content, name=self.name)
                content = mark_safe(t.render(context))
            except TemplateSyntaxError as error:
                if global_settings.DEBUG:
                    content = PLACEHOLDER_ERROR % {
                        'name': self.name,
                        'error': error,
                    }
                else:
                    content = ''
        if self.as_varname is None:
            return content
        context[self.as_varname] = content
        return ''
36308
def render(self, ctx=None):
        '''
        
        '''
        self._initialize()
        if not self.is_default():
            self._current_rendered = self._encode_value(self._current_value)
        return self._current_rendered
803575
function Markdown(data = '', options = {}) {

    this.initData = data;
    this.renderTree = null;
    this.html = '';

    this.fullInfo = !!options.fullInfo;
    this.dialect = options.dialect || Markdown.Dialect.DEFAULT;

}
563394
def render(self):
        
        start_tag = format_html('<div {}>', mark_safe(' '.join(self.field_attrs)))
        output = [start_tag]
        for widget in self:
            output.append(force_text(widget))
        output.append('</div>')
        return mark_safe('\n'.join(output))
748966
def render(self, hosts, vars={}):
        
        if self.tpl_file.endswith(".tpl"):
            return self._render_mako(hosts, vars)
        elif self.tpl_file.endswith(".py"):
            return self._render_py(hosts, vars)
        else:
            raise ValueError("Don't know how to handle '{0}'".format(self.tpl_file))
1365302
def render(self, template: str, **vars) -> str:
        
        vars.setdefault('ctx', self._ctx)
        return self._renderer.render(template, **vars)
425470
def extendMarkdown(self, md, md_globals=None):
        """"""
        if any(
                x not in md.treeprocessors
                for x in self.REQUIRED_EXTENSION_INTERNAL_NAMES):
            raise RuntimeError(
                "The attr_cols markdown extension depends the following"
                " extensions which must preceded it in the extension"
                " list: %s" % ", ".join(self.REQUIRED_EXTENSIONS))
        processor = AttrColTreeProcessor(md, self.conf)
        md.treeprocessors.register(
            processor, 'attr_cols',
            5)
941714
def render options = {}
      validate!
      self.compose do
        # Allow 'yield' to embed all children
        self.children.each do |child|
          fragment child
        end
      end.render(options)
    end
1120834
def render(self, name, value, attrs=None, **kwargs):
        
        output = super(Select2Mixin, self).render(
            name, value, attrs=attrs, **kwargs)
        id_ = attrs['id']
        output += self.render_js_code(
            id_, name, value, attrs=attrs, **kwargs)
        return mark_safe(output)
1028852
def markdown(text)
      erbified = ERB.new(text.html_safe).result(binding)
      red = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true)
      red.render(erbified).html_safe
    end
427007
def render_config(config: Config, indent: str = "") -> str:
    
    # Add four spaces to the indent.
    new_indent = indent + "    "

    return "".join([
            # opening brace + newline
            "{\n",
            # "type": "...", (if present)
            f'{new_indent}"type": "{config.typ3}",\n' if config.typ3 else '',
            # render each item
            "".join(_render(item, new_indent) for item in config.items),
            # indent and close the brace
            indent,
            "}\n"
    ])
1293365
def render_markdown(text, context=None):
    
    if context is None or not isinstance(context, dict):
        context = {}
    markdown_html = _transform_markdown_into_html(text)
    sanitised_markdown_html = _sanitise_markdown_html(markdown_html)
    return mark_safe(sanitised_markdown_html)
1032881
def render(self):
		
		self.widget.attrs = {
			k: v for k, v in self.attrs.items() if k[0] != "_"
		}
		self.set_input()

		if not self.attrs.get("_no_wrapper"):
			self.set_label()
			self.set_help()
			self.set_errors()
			self.set_classes()
			self.set_icon()  # Must be the bottom-most setter

		self.values["class"] = pad(" ".join(self.values["class"])).lstrip()
		result = mark_safe(FIELD_WRAPPER % self.values)
		self.widget.attrs = self.attrs  # Re-assign variables
		return result
24514
def parse_markdown(markdown_content, site_settings):
    
    markdown_extensions = set_markdown_extensions(site_settings)

    html_content = markdown.markdown(
        markdown_content,
        extensions=markdown_extensions,
    )

    return html_content
599074
def render(self, url, template=None, expiration=0):
        
        template = template or self.default_template
        
        return render_to_string(template, self.get_context(url, expiration))
669387
def render_extensions(key, options = {})
      extensions = find_extension_partials(key, options.delete(:folder)).map do |partial|
        render options.merge(:partial => partial)
      end
      safe_join(extensions)
    end