mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
implemented markdown parsing for console command description
issue #746
This commit is contained in:
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user