Initializes the renderer by setting up the extensions (taking a comma separated
    string or iterable of extensions). These extensions are added alongside with the
    configured always-on extensions.

    Returns a markdown renderer instance.
493299
def initialize_renderer(extensions=None):
    
    if extensions is None:
        extensions = []

    if isinstance(extensions, str):
        extensions = [extension.strip() for extension in extensions.split(',')]

    for extension in getattr(settings, 'MARKYMARK_EXTENSIONS', DEFAULT_MARKYMARK_EXTENSIONS):
        extensions.append(extension)

    return markdown.Markdown(extensions=extensions)
479030
function(options) {
            this.options = options;
            this.init(options);
            this.render = Augmented.Utility.wrap(this.render, function(render) {
              this.beforeRender();
              render.apply(this);
              this.afterRender();
              return this;
            });
          }
1230694
function()  {
        for (var i=0, len=this.renderers.length; i<len; i++) {
            var rendererClass = this.renderers[i];
            var renderer = (typeof rendererClass == "function") ?
                rendererClass :
                OpenLayers.Renderer[rendererClass];
            if (renderer && renderer.prototype.supported()) {
                this.renderer = new renderer(this.div, this.rendererOptions);
                break;
            }  
        }  
    }
480308
private function addManagedExtensions(RendererAdapterInterface $rendererAdapter)
    {
        $key = $this->getRendererAdapterKey($rendererAdapter);
        foreach ($rendererAdapter->getManagedFileExtensions() as $ext) {
            $rendererAdapters = array($key);
            if ($this->manageableExt->has($ext)) {
                $rendererAdapters = $this->manageableExt->get($ext);
                $rendererAdapters[] = $key;
            }

            $this->manageableExt->set($ext, $rendererAdapters);
        }
    }
831313
@PostConstruct
    public void init() {
        JFXDepthManager.setDepth(content, 1);
        JFXNodeUtils.addDelayedEventHandler(searchField, Duration.millis(400),
            KeyEvent.KEY_PRESSED, event -> highlighter.highlight(content, searchField.getText()));
    }
713221
def init(extension="css")
      if (extension.eql?("css") || extension.eql?("scss"))
        Richcss::Generators::Template.start([extension])
      else
        puts "Only support css or scss extension, default is css"
      end
    end
432783
@PostConstruct
    public void initialize() {
        final FwWebDirection direction = assistWebDirection();
        final ResponseHandlingProvider provider = direction.assistResponseHandlingProvider();
        if (provider != null) {
            responseWritePerformerCreator = provider.provideResponseWritePerformerCreator();
            responseDownloadPerformerCreator = provider.provideResponseDownloadPerformerCreator();
            downloadExtensionContentTypeMap = provider.provideDownloadExtensionContentTypeMap();
        }
        showBootLogging();
    }
1173524
def render
      extensions.reverse.inject(content) do |output, ext|
        if template_type = Tilt[ext]
          template_options = Massimo.config.options_for(ext[1..-1])
          template         = template_type.new(source_path.to_s, @line, template_options) { output }
          template.render(template_scope, template_locals)
        else
          output
        end
      end
    end
112153
def init_app(self, app):
        
        if not hasattr(app, 'extensions'):
            app.extensions = {}

        app.extensions['nav'] = self
        app.add_template_global(self.elems, 'nav')

        # register some renderers
        for args in self._renderers:
            register_renderer(app, *args)
803575
function Markdown(data = '', options = {}) {

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

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

}
1316715
public static function init() {
		
		// make sure config vars exist
		if (!Config::getOption("patternExtension")) {
			Console::writeError("the pattern extension config option needs to be set...");
		}
		
		if (!Config::getOption("styleguideKit")) {
			Console::writeError("the styleguideKit config option needs to be set...");
		}
		
		// set-up config vars
		$patternExtension        = Config::getOption("patternExtension");
		$metaDir                 = Config::getOption("metaDir");
		$styleguideKit           = Config::getOption("styleguideKit");
		$styleguideKitPath       = Config::getOption("styleguideKitPath");
		
		if (!$styleguideKitPath || !is_dir($styleguideKitPath)) {
			Console::writeError("your styleguide won't render because i can't find your styleguide files. are you sure they're at <path>".Console::getHumanReadablePath($styleguideKitPath)."</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath...");
		}
		
		// load pattern-lab's resources
		$partialPath             = $styleguideKitPath.DIRECTORY_SEPARATOR."views".DIRECTORY_SEPARATOR."partials";
		$generalHeaderPath       = $partialPath.DIRECTORY_SEPARATOR."general-header.".$patternExtension;
		$generalFooterPath       = $partialPath.DIRECTORY_SEPARATOR."general-footer.".$patternExtension;
		self::$htmlHead          = (file_exists($generalHeaderPath)) ? file_get_contents($generalHeaderPath) : "";
		self::$htmlFoot          = (file_exists($generalFooterPath)) ? file_get_contents($generalFooterPath) : "";
		
		// gather the user-defined header and footer information
		$patternHeadPath         = $metaDir.DIRECTORY_SEPARATOR."_00-head.".$patternExtension;
		$patternFootPath         = $metaDir.DIRECTORY_SEPARATOR."_01-foot.".$patternExtension;
		self::$patternHead       = (file_exists($patternHeadPath)) ? file_get_contents($patternHeadPath) : "";
		self::$patternFoot       = (file_exists($patternFootPath)) ? file_get_contents($patternFootPath) : "";
		
		// add the filesystemLoader
		$patternEngineBasePath   = PatternEngine::getInstance()->getBasePath();
		$filesystemLoaderClass   = $patternEngineBasePath."\Loaders\FilesystemLoader";
		
		$options                 = array();
		$options["templatePath"] = $styleguideKitPath.DIRECTORY_SEPARATOR."views";
		$options["partialsPath"] = $options["templatePath"].DIRECTORY_SEPARATOR."partials";
		
		self::$filesystemLoader  = new $filesystemLoaderClass($options);
		
		$stringLoaderClass       = $patternEngineBasePath."\Loaders\StringLoader";
		self::$stringLoader      = new $stringLoaderClass();
		
		// i can't remember why i chose to implement the pattern loader directly in classes
		// i figure i had a good reason which is why it's not showing up here
		
	}
1317373
function Renderer(options) {
  options = options || {};
  this.MD   = new MDRenderer(options);
  this.CGMD = new CGMDRenderer(new MDRenderer(options));

  return this;
}
38399
private ConsoleReaderWrapper initConsole() {
        ConsoleReaderWrapper consoleReaderWrapper = new ConsoleReaderWrapper();
        consoleReaderWrapper.print("");
        consoleReaderWrapper.print(question);
        consoleReaderWrapper.setCompleters(completers);
        if (history.isPresent()) {
            consoleReaderWrapper.enableHistoryFrom(history.get());
        } else {
            consoleReaderWrapper.disableHistory();
        }
        return consoleReaderWrapper;
    }
214756
function(options) {
        options = this.setOptions(options);
        this.element = this.createElement();

        // Generate loader elements
        this.loader = this.render(options.loaderTemplate).appendTo(this.element);
        this.message = this.loader.find(this.ns('message', 'loader'));

        if (options.showLoading) {
            this.message.html(Toolkit.messages.loading);
        }

        // Initialize
        this.initialize();
    }
926375
function (renderer, nodeName) {
		var wrapper = this;
		wrapper.element = nodeName === 'span' ?
			createElement(nodeName) :
			doc.createElementNS(SVG_NS, nodeName);
		wrapper.renderer = renderer;
		/**
		 * A collection of attribute setters. These methods, if defined, are called right before a certain
		 * attribute is set on an element wrapper. Returning false prevents the default attribute
		 * setter to run. Returning a value causes the default setter to set that value. Used in
		 * Renderer.label.
		 */
		wrapper.attrSetters = {};
	}
1357716
function findRenderer(extension) {
  var renderer;

  // Default to HTML if you don't have an extension
  extension = extension || renderers.default;
  // Get the renderer
  renderer = _.get(renderers, `${extension}`, null);

  if (renderer) {
    return renderer;
  } else {
    return new Error(`Renderer not found for extension ${extension}`);
  }
}
830303
private IRenderer buildRenderer(
			File outputDirectory,
			ApplicationTemplate applicationTemplate,
			File applicationDirectory,
			Renderer renderer,
			Map<String,String> typeAnnotations ) {

		IRenderer result = null;
		switch( renderer ) {
		case HTML:
			result = new HtmlRenderer( outputDirectory, applicationTemplate, applicationDirectory, typeAnnotations );
			break;

		case MARKDOWN:
			result = new MarkdownRenderer( outputDirectory, applicationTemplate, applicationDirectory, typeAnnotations );
			break;

		case FOP:
			result = new FopRenderer( outputDirectory, applicationTemplate, applicationDirectory, typeAnnotations );
			break;

		case PDF:
			result = new PdfRenderer( outputDirectory, applicationTemplate, applicationDirectory, typeAnnotations );
			break;

		default:
			break;
		}

		return result;
	}