library cmd
Based on cebe/markdown, add color and MathJax support.
qwerty_jack/cmd
Based on cebe/markdown, add color and MathJax support.
- Tuesday, April 18, 2017
- by QwertyJack
- Repository
- 1 Watchers
- 1 Stars
- 5 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Colored Markdown
Based on cebe/markdown,
add color and MathJax support., (*1)
Requirements
Installation
# checkout src
git clone https://github.com/QwertyJack/cmd.git
# install dependencies
php composer.phar update
Usage
- http (use
curl
for example)
curl <url/to/parser.php> -d text='{red **Hello World**}'
This will generate {red Hello World}., (*2)
See also index.html and static/my.js, (*3)
cat demo.md | php parser.php
or, (*4)
php parser.php demo.md
cat demo.md | php cli.php
or, (*5)
php cli.php demo.php
A playground is HERE., (*6)
Known Bugs
- 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.
TODO
- Sanitizing; maybe ircmaxell/Stauros.
- Beautify tables in terminal.
- Find a nearest color for unknown ones in terminal instead of just ignore it.
Acknowledgement
HAVE FUN !!!, (*7)