diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index 82fb3865ee..106bff5114 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -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} */ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md index c61e07555b..b46c975a79 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md @@ -13,15 +13,15 @@ Displays help for a command * `help [--format FORMAT] [--raw] [--] []` -The help command displays help for a given command: +The help command displays help for a given command: - php app/console help list + php app/console help list -You can also output the help in other formats by using the --format option: +You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + php app/console help --format=xml list -To display the list of available commands, please use the list command. +To display the list of available commands, please use the list command. ### Arguments @@ -125,21 +125,21 @@ Lists commands * `list [--raw] [--format FORMAT] [--] []` -The list command lists all commands: +The list command lists all commands: - php app/console list + php app/console list You can also display the commands for a specific namespace: - php app/console list test + php app/console list test -You can also output the information in other formats by using the --format option: +You can also output the information in other formats by using the --format option: - php app/console list --format=xml + php app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + php app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md index fedc712ab8..14da75e458 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md @@ -20,15 +20,15 @@ Displays help for a command * `help [--format FORMAT] [--raw] [--] []` -The help command displays help for a given command: +The help command displays help for a given command: - php app/console help list + php app/console help list -You can also output the help in other formats by using the --format option: +You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + php app/console help --format=xml list -To display the list of available commands, please use the list command. +To display the list of available commands, please use the list command. ### Arguments @@ -132,21 +132,21 @@ Lists commands * `list [--raw] [--format FORMAT] [--] []` -The list command lists all commands: +The list command lists all commands: - php app/console list + php app/console list You can also display the commands for a specific namespace: - php app/console list test + php app/console list test -You can also output the information in other formats by using the --format option: +You can also output the information in other formats by using the --format option: - php app/console list --format=xml + php app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + php app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md index 5e6388ba31..f34e5585cf 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md @@ -17,15 +17,15 @@ Displays help for a command * `help [--format FORMAT] [--raw] [--] []` -The help command displays help for a given command: +The help command displays help for a given command: - php app/console help list + php app/console help list -You can also output the help in other formats by using the --format option: +You can also output the help in other formats by using the --format option: - php app/console help --format=xml list + php app/console help --format=xml list -To display the list of available commands, please use the list command. +To display the list of available commands, please use the list command. ### Arguments @@ -129,21 +129,21 @@ Lists commands * `list [--raw] [--format FORMAT] [--] []` -The list command lists all commands: +The list command lists all commands: - php app/console list + php app/console list You can also display the commands for a specific namespace: - php app/console list test + php app/console list test -You can also output the information in other formats by using the --format option: +You can also output the information in other formats by using the --format option: - php app/console list --format=xml + php app/console list --format=xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + php app/console list --raw ### Arguments diff --git a/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md b/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md index af494422d1..a2be96721f 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/input_argument_with_style.md @@ -4,4 +4,4 @@ argument description * Is required: no * Is array: no -* Default: `'style'` +* Default: `'style'` diff --git a/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md b/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md index fca9ac7485..e07a5643a9 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style.md @@ -5,4 +5,4 @@ option description * Accept value: yes * Is value required: yes * Is multiple: no -* Default: `'style'` +* Default: `'style'` diff --git a/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md b/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md index f16ef73e58..16a045bcff 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/input_option_with_style_array.md @@ -5,4 +5,4 @@ option description * Accept value: yes * Is value required: yes * Is multiple: yes -* Default: `array ( 0 => 'Hello', 1 => 'world',)` +* Default: `array ( 0 => 'Hello', 1 => 'world',)`