<commit_before><?php
/**
 * @link https://github.com/borodulin/yii2-highlightjs
 * @copyright Copyright (c) 2015 <NAME>
 * @license https://github.com/borodulin/yii2-highlightjs/blob/master/LICENSE
 */

namespace conquer\highlightjs;

use yii\helpers\Html;
use conquer\helpers\Json;

/**
 * @author <NAME>
 */
class HighlightjsWidget extends \yii\base\Widget
{

    /**
     * Options Reference
     * @link http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
     * @var array
     */
    public $options = [];

    /**
     * Programming language to highlight
     * Hljs will autodetect it, if empty
     * @link http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html#language-names-and-aliases
     * @var string
     */
    public $language;
    
    /**
     * Container tag
     * @var string
     */
    public $tag = 'pre';

    /**
     * Container html options
     * @var array
     */
    public $htmlOptions = [];

    /**
     * Syntax highlight style
     * @link https://highlightjs.org/static/demo/
     * @var unknown
     */
    public $style = 'default';
    
    /**
     * Initializes the widget.
     * If you override this method, make sure you call the parent implementation first.
     */
    public function init()
    {
        if (!isset($this->htmlOptions['id'])) {
            $this->htmlOptions['id'] = $this->getId();
        }
        echo Html::beginTag($this->tag, $this->htmlOptions);
        if (is_string($this->language)) {
            $codeOptions = ['class' => $this->language];
        } else {
            $codeOptions = [];
        }
        echo Html::beginTag('code', $codeOptions);
    }

    /**
     * @inheritdoc
     */
    public function run()
    {
        echo Html::endTag('code');<commit_msg>content to render<commit_after><?php
/**
 * @link https://github.com/borodulin/yii2-highlightjs
 * @copyright Copyright (c) 2015 <NAME>
 * @license https://github.com/borodulin/yii2-highlightjs/blob/master/LICENSE
 */

namespace conquer\highlightjs;

use yii\helpers\Html;
use conquer\helpers\Json;

/**
 * @author <NAME>
 */
class HighlightjsWidget extends \yii\base\Widget
{

    /**
     * Options Reference
     * @link http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
     * @var array
     */
    public $options = [];

    /**
     * Programming language to highlight
     * Hljs will autodetect it, if empty
     * @link http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html#language-names-and-aliases
     * @var string
     */
    public $language;
    
    /**
     * Container tag
     * @var string
     */
    public $tag = 'pre';

    /**
     * Container html options
     * @var array
     */
    public $htmlOptions = [];

    /**
     * Syntax highlight style
     * @link https://highlightjs.org/static/demo/
     * @var unknown
     */
    public $style = 'default';
    
    /**
     * @var string
     */
    public $content;
    
    /**
     * Initializes the widget.
     * If you override this method, make sure you call the parent implementation first.
     */
    public function init()
    {
        if (!isset($this->htmlOptions['id'])) {
            $this->htmlOptions['id'] = $this->getId();
        }
        echo Html::beginTag($this->tag, $this->htmlOptions);
        if (is_string($this->language)) {
            $codeOptions = ['class' => $this->language];
        } else {
            $codeOptions = [];
        }
        echo Html::beginTag('code', $codeOptions);
    }

    /**
     * @inheritdoc
     */
    public function run()
    {
        if ($this->content) {
            echo Html::encode($this->content);
        }
        echo Html::endTag('code');
{'fraction_non_alphanumeric': 0.15075107296137338, 'fraction_numerical': 0.003218884120171674, 'mean_word_length': 2.1257334450963956, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 6, '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': '6847481', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1132, 'n_words': 233}