<commit_before>'use strict';

let L = require('leaflet');
let $ = require('jquery');
let path = require('path');
let markerIcon = require('./../../simple-map/img/marker-icon.png');
let markerShadow = require('./../../simple-map/img/marker-shadow.png');

module.exports = (map, Config) => {
  let icon = L.icon({
    iconUrl: markerIcon,
    shadowUrl: markerShadow,
    iconAnchor: [22, 94],
    popupAnchor: [-10, -86],
    shadowAnchor: [22, 94] 
  });

  for(let i in Config.simple.include) {
    let fileName = Object.keys(Config.simple.include[i])[0];
    let url = path.join(Config.output.path, Config.output.filename).replace('[name]', fileName);
    let file = Config.simple.include[i][fileName];

    $.getJSON(url, (data) => {
      L.geoJson(data, {
        onEachFeature(feature, layer) {
          let html = ""; 

          if(file.title == undefined && file.content == undefined) {
            for(let key in feature.properties) {
              html += key + "： " + feature.properties[key] + "<br/>";
            }   
            layer.bindPopup(html);
          }
          else {
            for(let key in file.title) {
              html += "<font class='header'>" + file.title[key] + (file.title[key] == "" ? "" : "： ") + feature.properties[key] + "</font><br/>"
            }
            for(let key in file.content) {
              html += file.content[key] + (file.content[key] == "" ? "" : "： ") + feature.properties[key] + "<br/>"
            }
            layer.bindPopup(html);
          }
        },  
        pointToLayer(feature, point) {
          let marker = L.marker(point, {icon: icon});
          return marker;
        }
      }).addTo(map);
    });
  }
}
<commit_msg>add style class<commit_after>'use strict';

let L = require('leaflet');
let $ = require('jquery');
let path = require('path');
let markerIcon = require('./../../simple-map/img/marker-icon.png');
let markerShadow = require('./../../simple-map/img/marker-shadow.png');

module.exports = (map, Config) => {
  let icon = L.icon({
    iconUrl: markerIcon,
    shadowUrl: markerShadow,
    iconAnchor: [22, 94],
    popupAnchor: [-10, -86],
    shadowAnchor: [22, 94] 
  });

  for(let i in Config.simple.include) {
    let fileName = Object.keys(Config.simple.include[i])[0];
    let url = path.join(Config.output.path, Config.output.filename).replace('[name]', fileName);
    let file = Config.simple.include[i][fileName];

    $.getJSON(url, (data) => {
      L.geoJson(data, {
        onEachFeature(feature, layer) {
          let html = ""; 

          if(file.title == undefined && file.content == undefined) {
            for(let key in feature.properties) {
              html += "<font class='content'>" + key + "： " + feature.properties[key] + "</font><br/>";
            }   
            layer.bindPopup(html);
          }
          else {
            for(let key in file.title) {
              html += "<font class='header'>" + file.title[key] + (file.title[key] == "" ? "" : "： ") + feature.properties[key] + "</font><br/>"
            }
            for(let key in file.content) {
              html += "<font class='content'>" + file.content[key] + (file.content[key] == "" ? "" : "： ") + feature.properties[key] + "</font><br/>"
            }
            layer.bindPopup(html);
          }
        },  
        pointToLayer(feature, point) {
          let marker = L.marker(point, {icon: icon});
          return marker;
        }
      }).addTo(map);
    });
  }
}

{'fraction_non_alphanumeric': 0.18908045977011495, 'fraction_numerical': 0.007471264367816092, 'mean_word_length': 2.138863841298467, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7026045', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1074, 'n_words': 210}