<commit_before>app.templates.newsPage = ->
  """ <h1 class="_lined-heading">Changelog</h1>
      <p class="_note">For the latest news and updates,
        subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a>
        or follow <a href="https://twitter.com/DevDocs">@DevDocs</a>.
      <div class="_news">#{app.templates.newsList app.news}</div> """

app.templates.newsList = (news) ->
  year = new Date().getUTCFullYear()
  result = ''

  for value in news
    date = new Date(value[0])
    if year isnt date.getUTCFullYear()
      year = date.getUTCFullYear()
      result += "<h4>#{year}</h4>"
    result += newsItem(date, value[1..])

  result

MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']

newsItem = (date, news) ->
  date = """<span class="_news-date">#{MONTHS[date.getUTCMonth()]} #{date.getUTCDate()}</span>"""
  result = ''

  for text, i in news
    text = text.split "\n"
    title = """<span class="_news-title">#{text.shift()}</span>"""
    result += """<div class="_news-row">#{if i is 0 then date else ''} #{title} #{text.join '<br>'}</div>"""

  result

app.news = [
  [ 1407110400000, # August 4, 2014
    """ New <a href="/django/">Django</a> documentation """,
  ], [
    1406419200000, # July 27, 2014
    """ New <a href="/markdown/">Markdown</a> documentation """,
  ], [
    1404518400000, # July 5, 2014
    """ New <a href="/cordova/">Cordova</a> documentation """,<commit_msg>Add changelog entry for MDN updates<commit_after>app.templates.newsPage = ->
  """ <h1 class="_lined-heading">Changelog</h1>
      <p class="_note">For the latest news and updates,
        subscribe to the <a href="http://eepurl.com/HnLUz">newsletter</a>
        or follow <a href="https://twitter.com/DevDocs">@DevDocs</a>.
      <div class="_news">#{app.templates.newsList app.news}</div> """

app.templates.newsList = (news) ->
  year = new Date().getUTCFullYear()
  result = ''

  for value in news
    date = new Date(value[0])
    if year isnt date.getUTCFullYear()
      year = date.getUTCFullYear()
      result += "<h4>#{year}</h4>"
    result += newsItem(date, value[1..])

  result

MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']

newsItem = (date, news) ->
  date = """<span class="_news-date">#{MONTHS[date.getUTCMonth()]} #{date.getUTCDate()}</span>"""
  result = ''

  for text, i in news
    text = text.split "\n"
    title = """<span class="_news-title">#{text.shift()}</span>"""
    result += """<div class="_news-row">#{if i is 0 then date else ''} #{title} #{text.join '<br>'}</div>"""

  result

app.news = [
  [ 1410048000000, # September 7, 2014
    """ Updated the HTML, CSS, JavaScript, and DOM documentations with additional content. """,
  ], [
    1407110400000, # August 4, 2014
    """ New <a href="/django/">Django</a> documentation """,
  ], [
    1406419200000, # July 27, 2014
    """ New <a href="/markdown/">Markdown</a> documentation """,
  ], [
    1404518400000, # July 5, 2014
    """ New <a href="/cordova/">Cordova</a> documentation """,
{'fraction_non_alphanumeric': 0.2125710675931775, 'fraction_numerical': 0.04485154769425142, 'mean_word_length': 3.636896046852123, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 57, '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': '7243750', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1091, 'n_words': 254}