10000 minor #21324 [FrameworkBundle] Fix third level headers for MarkdownDe… · symfony/symfony@1dfb108 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1dfb108

Browse files
committed
minor #21324 [FrameworkBundle] Fix third level headers for MarkdownDescriptor (ogizanagi)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Fix third level headers for MarkdownDescriptor | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A `~` is not valid as an underlining char when using markdown on the contrary of reStructuredText. See the rendering of [builder_1_public.md (before)](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md) vs [builder_1_public.md (after)](https://github.com/ogizanagi/symfony/blob/fix/2.7/fwb/md_third_lvl_headers/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md) for instance. This PR fixes it by using a third level header. ~~**EDIT:** There is no BC break. Wrong PR template information.~~ Commits ------- ce29ab1 [FrameworkBundle] Fix third level headers for MarkdownDescriptor
2 parents b860ec3 + ce29ab1 commit 1dfb108

File tree

5 files changed

+12
-22
lines changed

5 files changed

+12
-22
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
233233
}
234234
}
235235

236-
$this->write(isset($options['id']) ? sprintf("%s\n%s\n\n%s\n", $options['id'], str_repeat('~', strlen($options['id'])), $output) : $output);
236+
$this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
237237
}
238238

239239
/**
@@ -244,7 +244,7 @@ protected function describeContainerAlias(Alias $alias, array $options = array()
244244
$output = '- Service: `'.$alias.'`'
245245
."\n".'- Public: '.($alias->isPublic() ? 'yes' : 'no');
246246

247-
$this->write(isset($options['id']) ? sprintf("%s\n%s\n\n%s\n", $options['id'], str_repeat('~', strlen($options['id'])), $output) : $output);
247+
$this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
248248
}
249249

250250
/**

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Public services
44
Definitions
55
-----------
66

7-
definition_1
8-
~~~~~~~~~~~~
7+
### definition_1
98

109
- Class: `Full\Qualified\Class1`
1110
- Scope: `container`
@@ -21,14 +20,12 @@ definition_1
2120
Aliases
2221
-------
2322

24-
alias_1
25-
~~~~~~~
23+
### alias_1
2624

2725
- Service: `service_1`
2826
- Public: yes
2927

30-
alias_2
31-
~~~~~~~
28+
### alias_2
3229

3330
- Service: `service_2`
3431
- Public: no

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Public and private services
44
Definitions
55
-----------
66

7-
definition_1
8-
~~~~~~~~~~~~
7+
### definition_1
98

109
- Class: `Full\Qualified\Class1`
1110
- Scope: `container`
@@ -17,8 +16,7 @@ definition_1
1716
- Factory Class: `Full\Qualified\FactoryClass`
1817
- Factory Method: `get`
1918

20-
definition_2
21-
~~~~~~~~~~~~
19+
### definition_2
2220

2321
- Class: `Full\Qualified\Class2`
2422
- Scope: `container`
@@ -41,14 +39,12 @@ definition_2
4139
Aliases
4240
-------
4341

44 EDBE -
alias_1
45-
~~~~~~~
42+
### alias_1
4643

4744
- Service: `service_1`
4845
- Public: yes
4946

50-
alias_2
51-
~~~~~~~
47+
### alias_2
5248

5349
- Service: `service_2`
5450
- Public: no

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Public and private services with tag `tag1`
44
Definitions
55
-----------
66

7-
definition_2
8-
~~~~~~~~~~~~
7+
### definition_2
98

109
- Class: `Full\Qualified\Class2`
1110
- Scope: `container`

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Container tags
44
tag1
55
----
66

7-
definition_2
8-
~~~~~~~~~~~~
7+
### definition_2
98

109
- Class: `Full\Qualified\Class2`
1110
- Scope: `container`
@@ -22,8 +21,7 @@ definition_2
2221
tag2
2322
----
2423

25-
definition_2
26-
~~~~~~~~~~~~
24+
### definition_2
2725

2826
- Class: `Full\Qualified\Class2`
2927
- Scope: `container`

0 commit comments

Comments
 (0)
0