https://github.com/prod3v3loper/syntaxo
🔮 Highlight your Syntax with one small php class 14.76 KiB and gzip: 4.03 KiB
https://github.com/prod3v3loper/syntaxo
composer css highlighter highlighting html javascript less mysql packigist perl php sass syntax syntax-highlighter syntax-highlighting syntax-theme syntaxhighlighter
Last synced: 5 months ago
JSON representation
🔮 Highlight your Syntax with one small php class 14.76 KiB and gzip: 4.03 KiB
- Host: GitHub
- URL: https://github.com/prod3v3loper/syntaxo
- Owner: prod3v3loper
- License: mit
- Created: 2017-04-27T15:13:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T00:27:34.000Z (about 1 year ago)
- Last Synced: 2024-05-14T01:38:35.381Z (about 1 year ago)
- Topics: composer, css, highlighter, highlighting, html, javascript, less, mysql, packigist, perl, php, sass, syntax, syntax-highlighter, syntax-highlighting, syntax-theme, syntaxhighlighter
- Language: PHP
- Homepage: https://www.tnado.com/open-source-projects-by-prod3v3loper/
- Size: 2.47 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README



[](https://packagist.org/packages/prod3v3loper/syntaxo "Packigist Version")



[](https://github.com/prod3v3loper/syntaxo/blob/master/LICENSE "MIT License")
[](https://www.tnado.com/open-source-projects-by-prod3v3loper/ "Website")**melabuai**
# 🔮 SYNTAXO
Multi Syntax Highlighter programmed with PHP. Immediately ready for use and can be used anywhere in seconds.
[Theme Page of this Site](https://prod3v3loper.github.io/syntaxo/)

- HTML
- CSS
- LESS
- SASS
- JavaScript
- PHP
- MySQL
- Perl
And many more...# Usage
Very easy to use and very easy to modify. All you have to do is to include the file, instantiate the class, and call the method method with the string.
## Packagist with Composer
This solution extends the vendor autoloader because it calls the files with certain criteria. The extension allows you to call classes wherever the Autloder is involved.
Download [Composer](https://getcomposer.org/) local or global. Check for more [Tutorial - NetBeans with Composer and Packagist](https://www.tnado.com/blog/netbeans-with-composer-and-packagist-the-php-package-manager/) for this one.
You found the package on [Packigist - Syntaxo](https://packagist.org/packages/prod3v3loper/syntaxo).
Add the Syntaxo dependencie to the **composer.json** and set the autoload.
```json
{
"autoload": {
"psr-4": { "Syn\\": "src/" }
},
"require": {
"prod3v3loper/syntaxo": ">=1.0"
},
```Now run the composer install command with php
```
php composer.phar install
````index.php`
```php
require_once __DIR__ . '/vendor/autoload.php';
$HIGHLIGHT = new \Syn\Syntaxo();
echo $HIGHLIGHT->process('
Highlight
');
```## Git Install
```
git clone https://github.com/prod3v3loper/syntaxo.git /Users/username/projects/
```Get per [Git](https://git-scm.com/) or [download](https://github.com/prod3v3loper/syntaxo/archive/master.zip) and use it.
`index.php`
```php
require_once './src/Syntaxo.php';
$HIGHLIGHT = new \Syn\Syntaxo();
echo $HIGHLIGHT->process('
Highlight
');
```# REGEX MODIFY
Here's a snippet of Syntaxo regex for comments on each language. And you can modify them as needed and get even better results.
```php
// HTML
"/(<\!\-\-[[:space:]]*.*[[:space:]]*\-\->)/isU" => '\\1',
// JavaScript
"/(\/\/.*\n+)/isU" => '\\1',
// CSS
"/(? '\\1',
```# Preview

# Contribute
Please read the [contributing](https://github.com/prod3v3loper/syntaxo/blob/main/CONTRIBUTING.md).
# Authors
**Samet Tarim** [prod3v3loper](https://www.tnado.com/author/prod3v3loper/)
# License
[MIT](https://github.com/prod3v3loper/syntaxo/blob/master/LICENSE)