Download the PHP package bredmor/yaro without Composer
On this page you can find all versions of the php package bredmor/yaro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yaro
Yaro - Light Extensible Markdown Parser for PHP
Yaro is a Parser and Lexer framework meant for Markdown. By Default, Yaro parses basic markdown.
Installation / Usage
From Source:
Clone the repository from GitHub or unzip into your vendor directory. Yaro is packaged for PSR-4 autoloading.
From Composer:
composer require bredmor/yaro
Using in your project:
Adding a new markdown token to the default lexer:
Extensibility
You can either extend
the default parser or lexer, or implement LexerInterface
and ParserInterface
on your own, custom classes.
Just pass either to constructor when initiating it and it will be used instead of the default.
You can also change the parser or lexer of an existing Yaro object at any time. This allows you to Inject an already configured Yaro instance and swap contexts on the fly.
Requirements
PHP 7.2 or above.
Supported Markdown
Yaro's default lexer supports the following markdown:
*Italic Emphasis* with asterisks or underscores
**Bold** with asterisks or underscores
\~\~Strikethrough\~\~
----- Horizonal Rulers
#Headings
>Blockquotes (>, >, |, >> and »)
``` Code Blocks
` Inline Code
*Unordered Lists (*, - and +)
- Ordered Lists (any number)
[Links](http://example.com)
![Embedded Images](link_to_image.png)
Authors
- Morgan Breden | GitHub | Twitter | [email protected]
Contributing
Pull requests, bug reports and feature requests are welcome.
License
Yaro is licensed under the GPLv3 License - see the LICENSE file for details
Acknowledgements
Yaro is named after the individual who really wanted me to write another markdown parser specifically for their use case.