<commit_before><!DOCTYPE html>

<html lang="en-GB">

  <head>

    <meta charset="utf-8">
    <meta name="application-name" content="Remarkise">
    <meta name="description" content="Render your markdown as remark slides, in real time">
    <meta name="keywords" content="remark,markdown,md,slide,slideshow,remarkise,tripu">
    <meta name="author" content="tripu - http://tripu.info">
    <title>Remarkise&nbsp;&mdash;&nbsp;render your markdown as remark slides, in real time</title>

    <style type="text/css">

      /******************************** Original style */

      @import url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz');
      @import url('//fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic');
      @import url('//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic');

      body {
        font-family:       'Droid Serif';
      }

      h1, h2, h3 {
        font-family:       'Yanone Kaffeesatz';
        font-weight:       normal;
      }

      .remark-code,        .remark-inline-code {
        font-family:       'Ubuntu Mono';
      }

      /******************************** tripu's additions */

      div#front-page {
        position:          absolute;
        width:             100%;
        height:            100%;
      }

      div#front-page > div {
        position:          relative;
        top:               50%;
        -webkit-transform: translateY(-50%);
        -moz-transform:    translateY(-50%);
        -ms-transform:     translateY(-50%);
        -o-transform:      translateY(-50%);
        transform:         translateY(-50%);
        text-align:        center;
      }

      div#front-page > div > h1 {
        margin-top:        0;
        font-weight:       bold;
      }

      div#front-page > div > h1 > span {
        color:             #c00000;
      }

      div#front-page > div > p {
        font-style:        italic;
      }

      div#front-page > div > input {
        min-width:         30em;
        max-width:         80%;
        margin-bottom:     0;
      }

    </style>

  </head>

  <body>

    <div id="front-page">
      <div>
        <h1>Remark<span>ise</span></h1>
        <p>
          Render your <a href="http://commonmark.org/">markdown</a> as
          <a href="https://github.com/tripu/remark">remark</a> slides&nbsp;&mdash;&nbsp;in real time
        </p>
        <input id="url" placeholder="URL of a markdown file" />
      </div>
    </div>

    <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="downloads/remark-latest.min.js"></script>

    <script type="text/javascript">

      $(document).ready(function() {

        if (window.location.search && window.location.search.match(/\?url=.+/)) {
          remarkise(decodeURIComponent(window.location.search.split('=')[1]));
        } else {

          $('input').keypress(function(event) {

            if (event && 13 === event.keyCode && event.target && event.target.value) {
              remarkise(event.target.value);
            }

          });

        }

        function remarkise(url) {

          $('div#front-page > div > input').prop('disabled', true);
          $('div#front-page > div > p').text('Fetching markdown…');

          $.ajax({url: url,
            error: function(data) {
              /* var REGEX1 = /\/\/raw\.githubusercontent\.com\//;
              var REGEX2 = /\/\/github.com\//;
              var alternateUrl = url */
              console.log('error', data);
            },
            success: function(data) {
              history.pushState({}, 'foo', window.location.href + '?' + $.param({url: url}));
              $('div#front-page').hide();
              remark.create({source: data});
            }});

        }

      });

    </script>

  </body>

</html>

<!-- EOF -->
<commit_msg>Preventing an infinite loop when the URL was rewriten.<commit_after><!DOCTYPE html>

<html lang="en-GB">

  <head>

    <meta charset="utf-8">
    <meta name="application-name" content="Remarkise">
    <meta name="description" content="Render your markdown as remark slides, in real time">
    <meta name="keywords" content="remark,markdown,md,slide,slideshow,remarkise,tripu">
    <meta name="author" content="tripu - http://tripu.info">
    <title>Remarkise&nbsp;&mdash;&nbsp;render your markdown as remark slides, in real time</title>

    <style type="text/css">

      /******************************** Original style */

      @import url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz');
      @import url('//fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic');
      @import url('//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic');

      body {
        font-family:       'Droid Serif';
      }

      h1, h2, h3 {
        font-family:       'Yanone Kaffeesatz';
        font-weight:       normal;
      }

      .remark-code,        .remark-inline-code {
        font-family:       'Ubuntu Mono';
      }

      /******************************** tripu's additions */

      div#front-page {
        position:          absolute;
        width:             100%;
        height:            100%;
      }

      div#front-page > div {
        position:          relative;
        top:               50%;
        -webkit-transform: translateY(-50%);
        -moz-transform:    translateY(-50%);
        -ms-transform:     translateY(-50%);
        -o-transform:      translateY(-50%);
        transform:         translateY(-50%);
        text-align:        center;
      }

      div#front-page > div > h1 {
        margin-top:        0;
        font-weight:       bold;
      }

      div#front-page > div > h1 > span {
        color:             #c00000;
      }

      div#front-page > div > p {
        font-style:        italic;
      }

      div#front-page > div > input {
        min-width:         30em;
        max-width:         80%;
        margin-bottom:     0;
      }

    </style>

  </head>

  <body>

    <div id="front-page">
      <div>
        <h1>Remark<span>ise</span></h1>
        <p>
          Render your <a href="http://commonmark.org/">markdown</a> as
          <a href="https://github.com/tripu/remark">remark</a> slides&nbsp;&mdash;&nbsp;in real time
        </p>
        <input id="url" placeholder="URL of a markdown file" />
      </div>
    </div>

    <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="downloads/remark-latest.min.js"></script>

    <script type="text/javascript">

      $(document).ready(function() {

        if (window.location.search && window.location.search.match(/\?url=.+/)) {
          remarkise(decodeURIComponent(window.location.search.split('=')[1]));
        } else {

          $('input').keypress(function(event) {

            if (event && 13 === event.keyCode && event.target && event.target.value) {
              remarkise(event.target.value);
            }

          });

        }

        function remarkise(url) {

          $('div#front-page > div > input').prop('disabled', true);
          $('div#front-page > div > p').text('Fetching markdown…');

          $.ajax({url: url,
            error: function(data) {
              /* var REGEX1 = /\/\/raw\.githubusercontent\.com\//;
              var REGEX2 = /\/\/github.com\//;
              var alternateUrl = url */
              console.log('error', data);
            },
            success: function(data) {

              if (!window.location.search || !window.location.search.match(/\?url=.+/)) {
                history.pushState({}, 'foo', window.location.href + '?' + $.param({url: url}));
              }

              $('div#front-page').hide();
              remark.create({source: data});
            }});

        }

      });

    </script>

  </body>

</html>

<!-- EOF -->

{'fraction_non_alphanumeric': 0.17999242137173171, 'fraction_numerical': 0.015915119363395226, 'mean_word_length': 1.8087974459028024, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 107, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '567606', 'n_tokens_mistral': 2557, 'n_tokens_neox': 2361, 'n_words': 425}