implemented markdown parsing for console command description

issue #746
This commit is contained in:
Carsten Brandt
2014-06-25 18:05:29 +02:00
parent f46cffb4e4
commit 10dc407a3c
10 changed files with 219 additions and 19 deletions

View File

@ -16,14 +16,18 @@ use yii\helpers\VarDumper;
* Allows you to combine and compress your JavaScript and CSS files.
*
* Usage:
* 1. Create a configuration file using 'template' action:
* 1. Create a configuration file using the `template` action:
*
* yii asset/template /path/to/myapp/config.php
*
* 2. Edit the created config file, adjusting it for your web application needs.
* 3. Run the 'compress' action, using created config:
*
* yii asset /path/to/myapp/config.php /path/to/myapp/config/assets_compressed.php
*
* 4. Adjust your web application config to use compressed assets.
*
* Note: in the console environment some path aliases like '@webroot' and '@web' may not exist,
* Note: in the console environment some path aliases like `@webroot` and `@web` may not exist,
* so corresponding paths inside the configuration should be specified directly.
*
* Note: by default this command relies on an external tools to perform actual files compression,

View File

@ -225,7 +225,7 @@ class HelpController extends Controller
if ($comment !== '') {
$this->stdout("\nDESCRIPTION\n", Console::BOLD);
echo "\n" . Console::renderColoredString($comment) . "\n\n";
echo "\n" . rtrim(Console::renderColoredString(Console::markdownToAnsi($comment))) . "\n\n";
}
$actions = $this->getActions($controller);
@ -313,7 +313,7 @@ class HelpController extends Controller
if ($tags['description'] !== '') {
$this->stdout("\nDESCRIPTION\n", Console::BOLD);
echo "\n" . Console::renderColoredString($tags['description']) . "\n\n";
echo "\n" . rtrim(Console::renderColoredString(Console::markdownToAnsi($tags['description']))) . "\n\n";
}
$this->stdout("\nUSAGE\n\n", Console::BOLD);