Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7687bf5

Browse filesBrowse files
committed
Do not output formatting tags
1 parent 90dee8c commit 7687bf5
Copy full SHA for 7687bf5

File tree

Expand file treeCollapse file tree

3 files changed

+45
-23
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+45
-23
lines changed

‎src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php
+23-1Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Console\Input\InputArgument;
1818
use Symfony\Component\Console\Input\InputDefinition;
1919
use Symfony\Component\Console\Input\InputOption;
20+
use Symfony\Component\Console\Output\OutputInterface;
2021

2122
/**
2223
* Markdown descriptor.
@@ -27,6 +28,27 @@
2728
*/
2829
class MarkdownDescriptor extends Descriptor
2930
{
31+
/**
32+
* {@inheritdoc}
33+
*/
34+
public function describe(OutputInterface $output, $object, array $options = array())
35+
{
36+
$decorated = $output->isDecorated();
37+
$output->setDecorated(false);
38+
39+
parent::describe($output, $object, $options);
40+
41+
$output->setDecorated($decorated);
42+
}
43+
44+
/**
45+
* {@inheritdoc}
46+
*/
47+
protected function write($content, $decorated = true)
48+
{
49+
parent::write($content, $decorated);
50+
}
51+
3052
/**
3153
* {@inheritdoc}
3254
*/
@@ -103,7 +125,7 @@ protected function describeCommand(Command $command, array $options = array())
103125
.array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
104126
return $carry.'* `'.$usage.'`'."\n";
105127
})
106-
);
128+
, true);
107129

108130
if ($help = $command->getProcessedHelp()) {
109131
$this->write("\n");

‎src/Symfony/Component/Console/Tests/Fixtures/application_1.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/application_1.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Displays help for a command
1313

1414
* `help [--format FORMAT] [--raw] [--] [<command_name>]`
1515

16-
The <info>help</info> command displays help for a given command:
16+
The help command displays help for a given command:
1717

18-
<info>php app/console help list</info>
18+
php app/console help list
1919

20-
You can also output the help in other formats by using the <comment>--format</comment> option:
20+
You can also output the help in other formats by using the --format option:
2121

22-
<info>php app/console help --format=xml list</info>
22+
php app/console help --format=xml list
2323

24-
To display the list of available commands, please use the <info>list</info> command.
24+
To display the list of available commands, please use the list command.
2525

2626
### Arguments
2727

@@ -125,21 +125,21 @@ Lists commands
125125

126126
* `list [--raw] [--format FORMAT] [--] [<namespace>]`
127127

128-
The <info>list</info> command lists all commands:
128+
The list command lists all commands:
129129

130-
<info>php app/console list</info>
130+
php app/console list
131131

132132
You can also display the commands for a specific namespace:
133133

134-
<info>php app/console list test</info>
134+
php app/console list test
135135

136-
You can also output the information in other formats by using the <comment>--format</comment> option:
136+
You can also output the information in other formats by using the --format option:
137137

138-
<info>php app/console list --format=xml</info>
138+
php app/console list --format=xml
139139

140140
It's also possible to get raw list of commands (useful for embedding command runner):
141141

142-
<info>php app/console list --raw</info>
142+
php app/console list --raw
143143

144144
### Arguments
145145

‎src/Symfony/Component/Console/Tests/Fixtures/application_2.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/application_2.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Displays help for a command
2020

2121
* `help [--format FORMAT] [--raw] [--] [<command_name>]`
2222

23-
The <info>help</info> command displays help for a given command:
23+
The help command displays help for a given command:
2424

25-
<info>php app/console help list</info>
25+
php app/console help list
2626

27-
You can also output the help in other formats by using the <comment>--format</comment> option:
27+
You can also output the help in other formats by using the --format option:
2828

29-
<info>php app/console help --format=xml list</info>
29+
php app/console help --format=xml list
3030

31-
To display the list of available commands, please use the <info>list</info> command.
31+
To display the list of available commands, please use the list command.
3232

3333
### Arguments
3434

@@ -132,21 +132,21 @@ Lists commands
132132

133133
* `list [--raw] [--format FORMAT] [--] [<namespace>]`
134134

135-
The <info>list</info> command lists all commands:
135+
The list command lists all commands:
136136

137-
<info>php app/console list</info>
137+
php app/console list
138138

139139
You can also display the commands for a specific namespace:
140140

141-
<info>php app/console list test</info>
141+
php app/console list test
142142

143-
You can also output the information in other formats by using the <comment>--format</comment> option:
143+
You can also output the information in other formats by using the --format option:
144144

145-
<info>php app/console list --format=xml</info>
145+
php app/console list --format=xml
146146

147147
It's also possible to get raw list of commands (useful for embedding command runner):
148148

149-
<info>php app/console list --raw</info>
149+
php app/console list --raw
150150

151151
### Arguments
152152

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.