Configures Freemarker
175973
@Override
  public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer result = super.freeMarkerConfigurer();
    // Look up unknown templates in the FreemarkerTemplate repository
    result.setPostTemplateLoaders(new RepositoryTemplateLoader(dataService));
    return result;
  }
135629
function createMarkdownTemplate(file, vueObj) {

  let json2mdTemplate = [], mdTablesTemplate;
  
  mdTablesTemplate = buildTables(vueObj)
  
  if(mdTablesTemplate.length > 0) {
    json2mdTemplate = json2mdTemplate.concat(mdTablesTemplate)
  }

  return json2md(json2mdTemplate)
}
660578
function addLocationMarker(terria, initSources) {
  if (defined(terria.locationMarker)) {
    const position = terria.locationMarker.entities.values[0].position.getValue();
    const positionDegrees = Ellipsoid.WGS84.cartesianToCartographic(position);

    initSources.push({
      locationMarker: {
        name: terria.locationMarker.entities.values[0].name,
        latitude: CesiumMath.toDegrees(positionDegrees.latitude),
        longitude: CesiumMath.toDegrees(positionDegrees.longitude)
      }
    });
  }
}
356020
@Bean
  public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer result =
        new FreeMarkerConfigurer() {
          @Override
          protected void postProcessConfiguration(Configuration config) {
            config.setObjectWrapper(new MolgenisFreemarkerObjectWrapper(VERSION_2_3_23));
          }

          @Override
          protected void postProcessTemplateLoaders(List<TemplateLoader> templateLoaders) {
            templateLoaders.add(new ClassTemplateLoader(FreeMarkerConfigurer.class, ""));
          }
        };
    result.setPreferFileSystemAccess(false);
    result.setTemplateLoaderPath("classpath:/templates/");
    result.setDefaultEncoding("UTF-8");
    Properties freemarkerSettings = new Properties();
    freemarkerSettings.setProperty(Configuration.LOCALIZED_LOOKUP_KEY, Boolean.FALSE.toString());
    freemarkerSettings.setProperty(Configuration.NUMBER_FORMAT_KEY, "computer");
    result.setFreemarkerSettings(freemarkerSettings);
    Map<String, Object> freemarkerVariables = Maps.newHashMap();
    freemarkerVariables.put("hasPermission", new HasPermissionDirective(permissionService));
    freemarkerVariables.put("notHasPermission", new NotHasPermissionDirective(permissionService));
    addFreemarkerVariables(freemarkerVariables);

    result.setFreemarkerVariables(freemarkerVariables);

    return result;
  }
1064983
function setBookmarkURL () {
  var query = {};
  var options = form.getOptions();
  options.parse.json || (query["allow-json"] = "no");
  options.parse.yaml || (query["allow-yaml"] = "no");
  options.parse.text || (query["allow-text"] = "no");
  options.parse.json.allowEmpty || (query["allow-empty"] = "no");
  options.parse.binary || (query["allow-unknown"] = "no");
  options.resolve.external || (query["refs-external"] = "no");
  options.dereference.circular || (query["refs-circular"] = "no");
  options.validate.schema || (query["validate-schema"] = "no");
  options.validate.spec || (query["validate-spec"] = "no");

  var method = form.method.button.val();
  method === "validate" || (query.method = method);

  var url = form.url.val();
  url === "" || (query.url = url);

  var bookmark = "?" + qs.stringify(query);
  form.bookmark.attr("href", bookmark);
}
1022879
function skipBulletListMarker(state, startLine) {
  var marker, pos, max, ch;

  pos = state.bMarks[startLine] + state.tShift[startLine];
  max = state.eMarks[startLine];

  marker = state.src.charCodeAt(pos++);
  // Check bullet
  if (marker !== 0x2A/* * */ &&
      marker !== 0x2D/* - */ &&
      marker !== 0x2B/* + */) {
    return -1;
  }

  if (pos < max) {
    ch = state.src.charCodeAt(pos);

    if (!isSpace(ch)) {
      // " -test " - is not a list item
      return -1;
    }
  }

  return pos;
}
1338361
function configureHtmlCodeSniffer() {
			if (options.rules.length && options.standard !== 'Section508') {
				for (const rule of options.rules) {
					if (window.HTMLCS_WCAG2AAA.sniffs.includes(rule)) {
						window[`HTMLCS_${options.standard}`].sniffs[0].include.push(rule);
					} else {
						throw new Error(`${rule} is not a valid WCAG 2.0 rule`);
					}
				}
			}
		}
1116509
function() {
			this.writeDebug('clearMarkers');
			var locationsLimit = null;

			if (locationset.length < this.settings.storeLimit) {
				locationsLimit = locationset.length;
			}
			else {
				locationsLimit = this.settings.storeLimit;
			}

			for (var i = 0; i < locationsLimit; i++) {
				markers[i].setMap(null);
			}
		}
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)
11047
function updateMarks(editor, diff, state, type, classes) {
    var vp = editor.getViewport();
    editor.operation(function() {
      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
        clearMarks(editor, state.marked, classes);
        markChanges(editor, diff, type, state.marked, vp.from, vp.to, classes);
        state.from = vp.from; state.to = vp.to;
      } else {
        if (vp.from < state.from) {
          markChanges(editor, diff, type, state.marked, vp.from, state.from, classes);
          state.from = vp.from;
        }
        if (vp.to > state.to) {
          markChanges(editor, diff, type, state.marked, state.to, vp.to, classes);
          state.to = vp.to;
        }
      }
    });
  }
1107463
private function configureParser()
    {
        $renderer = $parser = null;
        $model = new \RunBB\Model\Admin\Parser();

        $configurator = new \s9e\TextFormatter\Configurator();
        $plugins = unserialize(User::get()->g_parser_plugins);

        $useSmilies = false;
        foreach ($plugins as $k => $plugin) {
            $configurator->plugins->load($plugin);
            if ($plugin === 'Emoticons') {
                $useSmilies = true;
            }
        }

        if ($useSmilies) {
            foreach ($model->getSmilies() as $k => $v) {
                $configurator->Emoticons->add($k, $v['html']);
            }
        }

        $configurator->registeredVars['cacheDir'] = ForumEnv::get('FORUM_CACHE_DIR');

        // Get an instance of the parser and the renderer
        extract($configurator->finalize());

        // We save the parser and the renderer to the disk for easy reuse
        Utils::checkDir($this->cacheDir);

        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Parser.php', serialize($parser));
        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Renderer.php', serialize($renderer));

        $this->parser = $parser;
        $this->renderer = $renderer;
    }
1261257
protected function setUp(): void
    {
        $this->addPointerToTokens();

        $this->docTagHelper = new DocTagHelper(
            $this->file,
            $this->stackPos,
            $this->tokens
        );
    }
820776
public void setMarkers(List<GenericMarker> m){
        this.markers = m;
        for (GenericMarker marker : m) {
            marker.setMap(this);
        }
        //setup any clustering options
        clusterMarkers();
    }
35928
def configure_attrs
			@options = {}

			eval( File::open( 'tdiary.conf' ) {|f| f.read }, nil, "(tdiary.conf)", 1 )

			# language setup
			@lang = 'ja' unless @lang
			begin
				instance_eval( File::open( "#{TDiary::PATH}/tdiary/lang/#{@lang}.rb" ){|f| f.read }, "(tdiary/lang/#{@lang}.rb)", 1 )
			rescue Errno::ENOENT
				@lang = 'ja'
				retry
			end

			@data_path += '/' if @data_path && /\/$/ !~ @data_path
			@style = 'tDiary' unless @style
			@index = './' unless @index
			@update = 'update.rb' unless @update
			@hide_comment_form = false unless defined?( @hide_comment_form )

			@author_name = '' unless @author_name
			@index_page = '' unless @index_page
			@hour_offset = 0 unless @hour_offset

			@html_title = '' unless @html_title
			@x_frame_options = nil unless @x_frame_options
			@header = '' unless @header
			@footer = '' unless @footer

			@section_anchor = '<span class="sanchor">_</span>' unless @section_anchor
			@comment_anchor = '<span class="canchor">_</span>' unless @comment_anchor
			@date_format = '%Y-%m-%d' unless @date_format
			@latest_limit = 10 unless @latest_limit
			@show_nyear = false unless @show_nyear

			@theme = 'default' if not @theme and not @css
			@theme = "local/#{@theme}" unless @theme.index('/')
			@css = '' unless @css

			@show_comment = true unless defined?( @show_comment )
			@comment_limit = 3 unless @comment_limit
			@comment_limit_per_day = 100 unless @comment_limit_per_day

			@show_referer = true unless defined?( @show_referer )
			@referer_limit = 10 unless @referer_limit
			@referer_day_only = true unless defined?( @referer_day_only )
			@no_referer = [] unless @no_referer
			@no_referer2 = [] unless @no_referer2
			@no_referer = @no_referer2 + @no_referer
			@only_volatile = [] unless @only_volatile
			@only_volatile2 = [] unless @only_volatile2
			@only_volatile = @only_volatile2 + @only_volatile
			@referer_table = [] unless @referer_table
			@referer_table2 = [] unless @referer_table2
			@referer_table = @referer_table2 + @referer_table

			@options = {} unless @options.class == Hash
			if @options2 then
				@options.update( @options2 )
			else
				@options2 = {}
			end

			# for 1.4 compatibility
			@section_anchor = @paragraph_anchor unless @section_anchor
		end
870806
public void addWhereClause(FreemarkerWhereClause freemarkerWhereClause) {
        String outputBody = freemarkerWhereClause.getOutputBody();
        if (StringUtils.isNotBlank(outputBody))
            freemarkerWhereClauses.add(outputBody);
    }
586549
@Singleton
    Configuration getConfiguration(FreemarkerViewsRendererConfiguration freemarkerConfiguration,
                                   ViewsConfiguration viewsConfiguration,
                                   Environment environment) {
        Configuration configuration = new Configuration(freemarkerConfiguration.getIncompatibleImprovements());
        configuration.setClassLoaderForTemplateLoading(environment.getClassLoader(), "/" + viewsConfiguration.getFolder());
        return configuration;
    }
397004
Marker addMarker() {
    if (!lazyInitDocumentation()) {
      return null;
    }

    if (documentation.markers == null) {
      documentation.markers = new ArrayList<>();
    }

    Marker marker = new Marker();
    documentation.markers.add(marker);
    return marker;
  }