Do not output formatting tags

This commit is contained in:
Maxime Steinhausser 2016-12-26 18:25:52 +01:00 committed by Maxime Steinhausser
parent 6896865bcc
commit ef5b087b4f
7 changed files with 58 additions and 36 deletions

View File

@ -17,6 +17,7 @@ use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Markdown descriptor.
@ -27,6 +28,27 @@ use Symfony\Component\Console\Input\InputOption;
*/
class MarkdownDescriptor extends Descriptor
{
/**
* {@inheritdoc}
*/
public function describe(OutputInterface $output, $object, array $options = array())
{
$decorated = $output->isDecorated();
$output->setDecorated(false);
parent::describe($output, $object, $options);
$output->setDecorated($decorated);
}
/**
* {@inheritdoc}
*/
protected function write($content, $decorated = true)
{
parent::write($content, $decorated);
}
/**
* {@inheritdoc}
*/

View File

@ -13,15 +13,15 @@ Displays help for a command
* `help [--format FORMAT] [--raw] [--] [<command_name>]`
The <info>help</info> command displays help for a given command:
The help command displays help for a given command:
<info>php app/console help list</info>
php app/console help list
You can also output the help in other formats by using the <comment>--format</comment> option:
You can also output the help in other formats by using the --format option:
<info>php app/console help --format=xml list</info>
php app/console help --format=xml list
To display the list of available commands, please use the <info>list</info> command.
To display the list of available commands, please use the list command.
### Arguments
@ -125,21 +125,21 @@ Lists commands
* `list [--raw] [--format FORMAT] [--] [<namespace>]`
The <info>list</info> command lists all commands:
The list command lists all commands:
<info>php app/console list</info>
php app/console list
You can also display the commands for a specific namespace:
<info>php app/console list test</info>
php app/console list test
You can also output the information in other formats by using the <comment>--format</comment> option:
You can also output the information in other formats by using the --format option:
<info>php app/console list --format=xml</info>
php app/console list --format=xml
It's also possible to get raw list of commands (useful for embedding command runner):
<info>php app/console list --raw</info>
php app/console list --raw
### Arguments

View File

@ -20,15 +20,15 @@ Displays help for a command
* `help [--format FORMAT] [--raw] [--] [<command_name>]`
The <info>help</info> command displays help for a given command:
The help command displays help for a given command:
<info>php app/console help list</info>
php app/console help list
You can also output the help in other formats by using the <comment>--format</comment> option:
You can also output the help in other formats by using the --format option:
<info>php app/console help --format=xml list</info>
php app/console help --format=xml list
To display the list of available commands, please use the <info>list</info> command.
To display the list of available commands, please use the list command.
### Arguments
@ -132,21 +132,21 @@ Lists commands
* `list [--raw] [--format FORMAT] [--] [<namespace>]`
The <info>list</info> command lists all commands:
The list command lists all commands:
<info>php app/console list</info>
php app/console list
You can also display the commands for a specific namespace:
<info>php app/console list test</info>
php app/console list test
You can also output the information in other formats by using the <comment>--format</comment> option:
You can also output the information in other formats by using the --format option:
<info>php app/console list --format=xml</info>
php app/console list --format=xml
It's also possible to get raw list of commands (useful for embedding command runner):
<info>php app/console list --raw</info>
php app/console list --raw
### Arguments

View File

@ -17,15 +17,15 @@ Displays help for a command
* `help [--format FORMAT] [--raw] [--] [<command_name>]`
The <info>help</info> command displays help for a given command:
The help command displays help for a given command:
<info>php app/console help list</info>
php app/console help list
You can also output the help in other formats by using the <comment>--format</comment> option:
You can also output the help in other formats by using the --format option:
<info>php app/console help --format=xml list</info>
php app/console help --format=xml list
To display the list of available commands, please use the <info>list</info> command.
To display the list of available commands, please use the list command.
### Arguments
@ -129,21 +129,21 @@ Lists commands
* `list [--raw] [--format FORMAT] [--] [<namespace>]`
The <info>list</info> command lists all commands:
The list command lists all commands:
<info>php app/console list</info>
php app/console list
You can also display the commands for a specific namespace:
<info>php app/console list test</info>
php app/console list test
You can also output the information in other formats by using the <comment>--format</comment> option:
You can also output the information in other formats by using the --format option:
<info>php app/console list --format=xml</info>
php app/console list --format=xml
It's also possible to get raw list of commands (useful for embedding command runner):
<info>php app/console list --raw</info>
php app/console list --raw
### Arguments

View File

@ -4,4 +4,4 @@ argument description
* Is required: no
* Is array: no
* Default: `'<comment>style</>'`
* Default: `'style'`

View File

@ -5,4 +5,4 @@ option description
* Accept value: yes
* Is value required: yes
* Is multiple: no
* Default: `'<comment>style</>'`
* Default: `'style'`

View File

@ -5,4 +5,4 @@ option description
* Accept value: yes
* Is value required: yes
* Is multiple: yes
* Default: `array ( 0 => '<comment>Hello</comment>', 1 => '<info>world</info>',)`
* Default: `array ( 0 => 'Hello', 1 => 'world',)`