Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc205bc6

Browse files
committed
bugsymfony#3468 enclose YAML string with double quotes to fix syntax highlighting (xabbuh)
This PR was merged into the 2.3 branch.Discussion----------enclose YAML string with double quotes to fix syntax highlighting| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | all| Fixed tickets |symfony#1886as mentioned by@ifdattic insymfony#3467Commits-------24be690 enclose YAML string with double quotes to fix syntax highlighting
2 parentsf077a8e +24be690 commitc205bc6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎cookbook/routing/service_container_parameters.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ inside your routing configuration:
1818

1919
..code-block::yaml
2020
21+
# app/config/routing.yml
2122
contact:
2223
path:/{_locale}/contact
2324
defaults:{ _controller: AcmeDemoBundle:Main:contact }
2425
requirements:
25-
_locale:%acme_demo.locales%
26+
_locale:"%acme_demo.locales%"
2627
2728
..code-block::xml
2829
30+
<!-- app/config/routing.xml-->
2931
<?xml version="1.0" encoding="UTF-8" ?>
30-
3132
<routesxmlns="http://symfony.com/schema/routing"
3233
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3334
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
@@ -40,6 +41,7 @@ inside your routing configuration:
4041
4142
..code-block::php
4243
44+
// app/config/routing.php
4345
use Symfony\Component\Routing\RouteCollection;
4446
use Symfony\Component\Routing\Route;
4547
@@ -82,14 +84,15 @@ path):
8284

8385
..code-block::yaml
8486
87+
# app/config/routing.yml
8588
some_route:
8689
path:/%acme_demo.route_prefix%/contact
8790
defaults:{ _controller: AcmeDemoBundle:Main:contact }
8891
8992
..code-block::xml
9093
94+
<!-- app/config/routing.xml-->
9195
<?xml version="1.0" encoding="UTF-8" ?>
92-
9396
<routesxmlns="http://symfony.com/schema/routing"
9497
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9598
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
@@ -101,6 +104,7 @@ path):
101104
102105
..code-block::php
103106
107+
// app/config/routing.php
104108
use Symfony\Component\Routing\RouteCollection;
105109
use Symfony\Component\Routing\Route;
106110
@@ -116,7 +120,7 @@ path):
116120
Just like in normal service container configuration files, if you actually
117121
need a ``%`` in your route, you can escape the percent sign by doubling
118122
it, e.g. ``/score-50%%``, which would resolve to ``/score-50%``.
119-
123+
120124
However, as the ``%`` characters included in any URL are automatically encoded,
121125
the resulting URL of this example would be ``/score-50%25`` (``%25`` is the
122126
result of encoding the ``%`` character).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp