Based on cebe/markdown, add color and MathJax support.
# checkout src
git clone https://github.com/QwertyJack/cmd.git
# install dependencies
php composer.phar update
- http (use
curl
for example)
curl <url/to/parser.php> -d text='{red **Hello World**}'
This will generate {red Hello World}.
See also index.html and static/my.js
- cli
cat demo.md | php parser.php
or
php parser.php demo.md
- parser for terminal
cat demo.md | php cli.php
or
php cli.php demo.php
A playground is HERE.
- The terminal parser fail to parse list begin with
*
. - Nested inline color make a mess.
- Color blocks make the following table cells not parsed correctly.
- Sanitizing; maybe ircmaxell/Stauros.
- Beautify tables in terminal.
- Find a nearest color for unknown ones in terminal instead of just ignore it.
- cebe/markdown
- mathjax/MathJax
- composer/composer
- mogria/colorful.php
- XSS vulnerability by @showdownjs
HAVE FUN !!!