<commit_before><?php

require_once './vendor/autoload.php';

use Symfony\Component\Yaml\Parser;
use Cocur\Slugify\Slugify;

$version = "2.2.13";

$yaml = new Parser();
$cheatsheet = $yaml->parse(file_get_contents('cheatsheet.yml'));

$loader = new Twig_Loader_Filesystem('./view');
$twig = new Twig_Environment($loader, array(
  'cache' => './cache',
));

// Add Dumper function to twig.
$dumper = new Twig_SimpleFunction(
    'dump',
    function ($var) { return dump($var); },
    array('is_safe' => array('html')
));
$twig->addFunction($dumper);


// Add markdown to twig.
$markdown = new Twig_SimpleFilter(
    'markdown',
    function ($content) { return \ParsedownExtra::instance()->text($content); },
    array('is_safe' => array('html')
));
$twig->addFilter($markdown);

// Add slug filter to twig.
$slug = new Twig_SimpleFilter(
    'slug',
    function ($name) {
        $s = new Slugify();
        return $s->slugify($name);
    },
    array('is_safe' => array('html')
));
$twig->addFilter($slug);


echo $twig->render('index.twig', array(
    'title' => "Bolt Cheatsheet",
    'cheatsheet' => $cheatsheet,
    'version' => $version
));



<commit_msg>Bumping version to 2.2.14<commit_after><?php

require_once './vendor/autoload.php';

use Symfony\Component\Yaml\Parser;
use Cocur\Slugify\Slugify;

$version = "2.2.14";

$yaml = new Parser();
$cheatsheet = $yaml->parse(file_get_contents('cheatsheet.yml'));

$loader = new Twig_Loader_Filesystem('./view');
$twig = new Twig_Environment($loader, array(
  'cache' => './cache',
));

// Add Dumper function to twig.
$dumper = new Twig_SimpleFunction(
    'dump',
    function ($var) { return dump($var); },
    array('is_safe' => array('html')
));
$twig->addFunction($dumper);


// Add markdown to twig.
$markdown = new Twig_SimpleFilter(
    'markdown',
    function ($content) { return \ParsedownExtra::instance()->text($content); },
    array('is_safe' => array('html')
));
$twig->addFilter($markdown);

// Add slug filter to twig.
$slug = new Twig_SimpleFilter(
    'slug',
    function ($name) {
        $s = new Slugify();
        return $s->slugify($name);
    },
    array('is_safe' => array('html')
));
$twig->addFilter($slug);


echo $twig->render('index.twig', array(
    'title' => "Bolt Cheatsheet",
    'cheatsheet' => $cheatsheet,
    'version' => $version
));




{'fraction_non_alphanumeric': 0.19760479041916168, 'fraction_numerical': 0.0051325919589392645, 'mean_word_length': 3.997863247863248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '3561880', 'n_tokens_mistral': 852, 'n_tokens_neox': 841, 'n_words': 169}