<commit_before><div class="map-container">
  <div id="latlngmap"></div>
</div>
<% content_for :javascript do %>
  <script type="text/javascript">
    // Attach a leaflet.js map to the div above
    var map = L.map('latlngmap');
    var osm = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
      attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
    });
    map.addLayer(osm);
    
    // Get the centre lat/lng from the field or the initial default if the field
    // hasn't been set yet
    var latlng = [];
    if (lng === undefined) {
      latlng = <%= field.initial.to_json %>;
    } else {
      latlng = [lat, lng];
    }
    map.setView(latlng, <%= field.zoom %>);
    
    // Add a marker if the field has been set already
    var marker;
    if (lng !== undefined) {
      marker = L.marker(latlng);
      marker.addTo(map);
    }
    <% if edit %>
    // In edit mode, move the marker and update the fields when a user clicks
    // inside the map
    map.on('click', function (e) {
      if (marker === undefined) {
        marker = L.marker(e.latlng);
        marker.addTo(map);
      } else {
        marker.setLatLng(e.latlng);<commit_msg>Use explicit marker icon to ensure icon file path works<commit_after><div class="map-container">
  <div id="latlngmap"></div>
</div>
<% content_for :javascript do %>
  <script type="text/javascript">
    // Attach a leaflet.js map to the div above
    var map = L.map('latlngmap');
    var osm = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
      attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
    });
    map.addLayer(osm);
    
    // Get the centre lat/lng from the field or the initial default if the field
    // hasn't been set yet
    var latlng = [];
    if (lng === undefined) {
      latlng = <%= field.initial.to_json %>;
    } else {
      latlng = [lat, lng];
    }
    map.setView(latlng, <%= field.zoom %>);
    
    // Add a marker if the field has been set already
    var marker;
    if (lng !== undefined) {
      var icon = new L.Icon.Default();
      var options = { icon: icon };
      marker = L.marker(latlng, options);
      marker.addTo(map);
    }
    <% if edit %>
    // In edit mode, move the marker and update the fields when a user clicks
    // inside the map
    map.on('click', function (e) {
      if (marker === undefined) {
        marker = L.marker(e.latlng);
        marker.addTo(map);
      } else {
        marker.setLatLng(e.latlng);
{'fraction_non_alphanumeric': 0.15408560311284047, 'fraction_numerical': 0.0, 'mean_word_length': 2.451006711409396, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '2123217', 'n_tokens_mistral': 880, 'n_tokens_neox': 847, 'n_words': 241}