<commit_before>module MephistoPlugins
  module MeasureMap
    include ActionView::Helpers::JavascriptHelper

    def measure_map_comment(comment)
      javascript_tag(%Q{if(!mmcomments){var mmcomments=[];}mmcomments[mmcomments.length]="#{comment['id']}";}) +
      %Q{<!-- mmc mmid:#{comment['id']} mmdate:#{format_date(comment['created_at'], :db)} mmauthor:#{escape_html comment['author']} -->}
    end

    def measure_map_post(article)
      javascript_tag(%Q{if(!mmposts){var mmposts=[];}mmposts[mmposts.length]="#{article['id']}";}) +
      %Q{<!-- mmp mmid:#{article['id']} mmdate:#{format_date(article['published_at'], :db)} mmurl:#{url_for_article(article)} mmtitle:#{escape_html(article['title'])} -->}
    end

    def measure_map_footer(foo)
      content_tag :script, nil, :type => 'text/javascript', :src => 'http://tracker.measuremap.com/a/413'
    end
  end
end<commit_msg>fix use of old url_for_article filter<commit_after>module MephistoPlugins
  module MeasureMap
    include ActionView::Helpers::JavascriptHelper

    def measure_map_comment(comment)
      javascript_tag(%Q{if(!mmcomments){var mmcomments=[];}mmcomments[mmcomments.length]="#{comment['id']}";}) +
      %Q{<!-- mmc mmid:#{comment['id']} mmdate:#{format_date(comment['created_at'], :db)} mmauthor:#{escape_html comment['author']} -->}
    end

    def measure_map_post(article)
      javascript_tag(%Q{if(!mmposts){var mmposts=[];}mmposts[mmposts.length]="#{article['id']}";}) +
      %Q{<!-- mmp mmid:#{article['id']} mmdate:#{format_date(article['published_at'], :db)} mmurl:#{article['url']} mmtitle:#{escape_html(article['title'])} -->}
    end

    def measure_map_footer(foo)
      content_tag :script, nil, :type => 'text/javascript', :src => 'http://tracker.measuremap.com/a/413'
    end
  end
end
{'fraction_non_alphanumeric': 0.19888268156424582, 'fraction_numerical': 0.0033519553072625698, 'mean_word_length': 5.784090909090909, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '3635002', 'n_tokens_mistral': 645, 'n_tokens_neox': 608, 'n_words': 88}