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
Requires
- php: ^5.5.9 || ^7.0
- scrivo/highlight.php: ^9
- symfony/framework-bundle: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^1.11
- phpunit/phpunit: ~4.8|~5.0
- symfony/console: ^3.0
- symfony/phpunit-bridge: ^3.0
This package is not auto-updated.
Last update: 2024-11-10 03:41:17 UTC
README
MesHighlightBundle is based on scrivo/highlight.php library, a port of highlight.js by Ivan Sagalaev to PHP.
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
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.