carteni/highlight-bundle

A port of highlight.js by Ivan Sagalaev to PHP

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Type:symfony-bundle

v1.1.2 2017-06-09 07:09 UTC

This package is not auto-updated.

Last update: 2024-04-14 00:54:29 UTC


README

687474703a2f2f7777772e6d756c74696d65646961657870657269656e636573747564696f2e69742f5f63646e2f7075626c69632f6173736574732f6e6c6f676f2e737667

MesHighlightBundle is based on scrivo/highlight.php library, a port of highlight.js by Ivan Sagalaev to PHP.

SensioLabsInsight Build Status Scrutinizer Code Quality Code Coverage Latest Unstable Version Latest Stable Version License

Step 1: Download the Bundle

$ composer require carteni/highlight-bundle

Step 2: Enable the Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new \Mes\Misc\HighlightBundle\MesHighlightBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Install styles

$ bin/console assets:install --symlink

Step 4: Configure the Bundle (optional)

mes_highlight:
    supported_languages: ["php", "xml", "twig", "javascript", "sql", "json"]
    root_path: "%kernel.root_dir%/Resources/"
    left_delimiter: "{{"
    right_delimiter: "}}"

Examples

See the Documentation

License

This bundle is under the MIT license. See the complete license in the bundle

Reporting an issue

Issues are tracked in the Github issue tracker.

Enjoy!

♥ ☕ m|e|s