2017 © Pedro Peláez
 

library highlight

PHP Syntax Highlighter

image

kelunik/highlight

PHP Syntax Highlighter

  • Wednesday, December 21, 2016
  • by kelunik
  • Repository
  • 7 Watchers
  • 4 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

highlight

A (PHP) syntax highlighter written in PHP., (*1)

<?php

$hl = new Kelunik\Highlight\Highlighter(new HtmlFormatter("php"));

// <optional>
$hl->addPreProcessor(new Your\Custom\PreProcessor);
$hl->addPostProcessor(new Your\Custom\PostProcessor);
// </optional>

print $hl->highlight("<?php print 'Hello World';");

CLI, (*2)

These CLI scripts should give you some hints on how to use the API., (*3)

bin/highlight /path/to/file.php
bin/highlight-html /path/to/file.php > out.html

Supported Languages, (*4)

Currently, only PHP is supported. But you could just add another Lexer., (*5)

The Versions

21/12 2016

dev-master

9999999-dev

PHP Syntax Highlighter

  Sources   Download

MIT

The Requires

 

The Development Requires

11/11 2016

v0.1.0

0.1.0.0

PHP Syntax Highlighter

  Sources   Download

MIT

The Requires

 

The Development Requires