<commit_before><!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="../dist/sir-trevor.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
  <form>
    <!-- <textarea class="sir-trevor--one"></textarea> -->
    <textarea class="sir-trevor--two"></textarea>
  </form>

  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script src="../components/underscore/underscore.js" type="text/javascript" charset="utf-8"></script>
  <script src="../components/Eventable/eventable.js" type="text/javascript" charset="utf-8"></script>
  <script src="../dist/sir-trevor.js" type="text/javascript" charset="utf-8"></script>
  <script src="javascript/limit_chars.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">
    $(function(){

      SirTrevor.DEBUG = true;

      var set_quote_and_text_limits = function() {
        this.$editor
          .attr('maxlength', '300')
          .limit_chars();
      }

      SirTrevor.Blocks.Text.prototype.onBlockRender = set_quote_and_text_limits;
      SirTrevor.Blocks.Quote.prototype.onBlockRender = set_quote_and_text_limits;

      // window.editor = new SirTrevor.Editor({
      //   el: $('.sir-trevor--one'),
      //   blockTypes: ["Text"],
      //   required: ['Text'],
      //   blockTypeLimits: { "Text": 1 }
      // });

      window.editor = new SirTrevor.Editor({
        el: $('.sir-trevor--two'),
        useTruncationBlock : true
      });

      $('form').bind('submit', function(){
        return false;
      });

    });
  </script>
</body>
</html><commit_msg>use local jsquery for example and add truncation block to list of available blocks<commit_after><!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="../dist/sir-trevor.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
  <form>
    <!-- <textarea class="sir-trevor--one"></textarea> -->
    <textarea class="sir-trevor--two"></textarea>
  </form>

  <script src="../components/jquery/jquery.js"></script>
  <script src="../components/underscore/underscore.js" type="text/javascript" charset="utf-8"></script>
  <script src="../components/Eventable/eventable.js" type="text/javascript" charset="utf-8"></script>
  <script src="../dist/sir-trevor.js" type="text/javascript" charset="utf-8"></script>
  <script src="javascript/limit_chars.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">
    $(function(){

      SirTrevor.DEBUG = true;

      var set_quote_and_text_limits = function() {
        this.$editor
          .attr('maxlength', '300')
          .limit_chars();
      }

      SirTrevor.Blocks.Text.prototype.onBlockRender = set_quote_and_text_limits;
      SirTrevor.Blocks.Quote.prototype.onBlockRender = set_quote_and_text_limits;

      // window.editor = new SirTrevor.Editor({
      //   el: $('.sir-trevor--one'),
      //   blockTypes: ["Text"],
      //   required: ['Text'],
      //   blockTypeLimits: { "Text": 1 }
      // });

      window.editor = new SirTrevor.Editor({
        el: $('.sir-trevor--two'),
        useTruncationBlock : true,
        blockTypes: [
          "Text",
          "List",
          "Quote",
          "Truncation"
        ]
      });

      $('form').bind('submit', function(){
        return false;
      });

    });
  </script>
</body>
</html>
{'fraction_non_alphanumeric': 0.2178240217145442, 'fraction_numerical': 0.01063107894141597, 'mean_word_length': 3.086876155268022, 'pattern_counts': {'":': 2, '<': 95, '<?xml version=': 0, '>': 93, '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': '5282311', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1489, 'n_words': 273}