2017 © Pedro Peláez
 

library php-pygmentize

Pure PHP linear syntax highlighter inspired by Pygmentize

image

mrtnzlml/php-pygmentize

Pure PHP linear syntax highlighter inspired by Pygmentize

  • Tuesday, April 11, 2017
  • by mrtnzlml
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

This package is future replacement for deprecated FSHL heavily inspired by RegexLexer from Python Pygments but written in pure PHP., (*1)

Minimal example, (*2)

<?php
require __DIR__ . '/vendor/autoload.php'; // composer

$content = (new Adeira\Highlighter(
    new Adeira\Lexer\Sql,
    new Adeira\Formatter\Html
))->highlight(__DIR__ . '/tests/src/Lexer/Sql/sample.sql');
echo "<link rel=\"stylesheet\" href=\"src/Style/default.css\"/>

$content
";

See: preview.php output, (*3)

TODO: - change package namespace - cache, (*4)

LANGUAGES: - python - cpp - tex/latex - java, (*5)

The Versions

11/04 2017

dev-master

9999999-dev

Pure PHP linear syntax highlighter inspired by Pygmentize

  Sources   Download

MIT

The Development Requires