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

[Console] Enhance MarkdownDescriptor #20896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 16, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Console] MarkdownDescriptor: Link to commands anchors
  • Loading branch information
ogizanagi committed Jan 21, 2017
commit fc2395e237d46030d9c8263417929d3f85387690
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ protected function describeApplication(Application $application, array $options
}

$this->write("\n\n");
$this->write(implode("\n", array_map(function ($commandName) {
return '* `'.$commandName.'`';
$this->write(implode("\n", array_map(function ($commandName) use ($description) {
return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName()));
}, $namespace['commands'])));
}

Expand Down
4 changes: 2 additions & 2 deletions 4 src/Symfony/Component/Console/Tests/Fixtures/application_1.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Console Tool
============

* `help`
* `list`
* [`help`](#help)
* [`list`](#list)

`help`
------
Expand Down
12 changes: 6 additions & 6 deletions 12 src/Symfony/Component/Console/Tests/Fixtures/application_2.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
My Symfony application <info>v1.0</info>
========================================

* `alias1`
* `alias2`
* `help`
* `list`
* [`alias1`](#descriptorcommand1)
* [`alias2`](#descriptorcommand1)
* [`help`](#help)
* [`list`](#list)

**descriptor:**

* `descriptor:command1`
* `descriptor:command2`
* [`descriptor:command1`](#descriptorcommand1)
* [`descriptor:command2`](#descriptorcommand2)

`help`
------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
MbString åpplicätion
====================

* `help`
* `list`
* [`help`](#help)
* [`list`](#list)

**descriptor:**

* `descriptor:åèä`
* [`descriptor:åèä`](#descriptoråèä)

`help`
------
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.