<commit_before><?php

// We need a function that can add ids to HTML header tags
function retitle($match) {
    list($_unused, $h3, $title) = $match;

    $id = strtolower(strtr($title, " .", "--"));

    return "<$h3 id='$id'>$title</$h3>";
}

# Install PSR-0-compatible class autoloader
spl_autoload_register(function($class){
	require 'php_markdown/' . preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
});

# Get Markdown class
//use \Michelf\Markdown;
use \Michelf\MarkdownExtra;

$text = file_get_contents(dirname(__FILE__) . '/../README.md');
$html = MarkdownExtra::defaultTransform($text);
?>
<!DOCTYPE html>
<html>
    <head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
        <title>PHP Markdown Lib - Readme</title>
    </head>
    <body>
        <div class="container">
		<?php
			# Put HTML content in the document
            $html = str_replace('<table>', '<table class="table table-striped">', $html);
            $html = preg_replace_callback("#<(h[1-6])>(.*?)</\\1>#", "retitle", $html);
            echo $html;
		?>
        </div>
    </body>
</html><commit_msg>Example insert buttons<commit_after><?php

// We need a function that can add ids to HTML header tags
function retitle($match) {
    list($_unused, $h3, $title) = $match;

    $id = strtolower(strtr($title, " .", "--"));

    return "<$h3 id='$id'>$title</$h3>";
}

# Install PSR-0-compatible class autoloader
spl_autoload_register(function($class){
	require 'php_markdown/' . preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
});

# Get Markdown class
//use \Michelf\Markdown;
use \Michelf\MarkdownExtra;

$text = file_get_contents(dirname(__FILE__) . '/../README.md');
$html = MarkdownExtra::defaultTransform($text);
?>
<!DOCTYPE html>
<html>
    <head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
        
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script>
    $(document).ready(function() {
        $(".insert-code").click(function() {
            var example = $( this ).parent().prev().find("code").text();
            var lines = example.split('\n');
            var paras = '';
            $.each(lines, function(i, line) {
                if (line) {
                    paras += line + '<br>';
                }
            });
            var win = window.dialogArguments || opener || parent || top;
            win.send_to_editor(paras);
        });
    });
</script>
        <title>Bootstrap Shortcodes Documentation</title>
    </head>
    <body>
        <div class="container">
		<?php
			# Put HTML content in the document
            $html = str_replace('<table>', '<table class="table table-striped">', $html);
            $html = preg_replace_callback("#<(h[1-6])>(.*?)</\\1>#", "retitle", $html);
            $html = str_replace('</pre>', '</pre><p><input type="button" class="button-primary insert-code" value="Insert Example" /></p>', $html);
            echo $html;
		?>
        </div>
    </body>
</html>
{'fraction_non_alphanumeric': 0.20825515947467166, 'fraction_numerical': 0.009380863039399626, 'mean_word_length': 3.00859291084855, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '5510922', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1223, 'n_words': 242}