From 24be69041ad32e68e583bda9275934e487aca32f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 12 Jan 2014 12:32:35 +0100 Subject: [PATCH] enclose YAML string with double quotes to fix syntax highlighting --- cookbook/routing/service_container_parameters.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cookbook/routing/service_container_parameters.rst b/cookbook/routing/service_container_parameters.rst index 8eaa7d524f8..9ac05c48e60 100644 --- a/cookbook/routing/service_container_parameters.rst +++ b/cookbook/routing/service_container_parameters.rst @@ -18,16 +18,17 @@ inside your routing configuration: .. code-block:: yaml + # app/config/routing.yml contact: path: /{_locale}/contact defaults: { _controller: AcmeDemoBundle:Main:contact } requirements: - _locale: %acme_demo.locales% + _locale: "%acme_demo.locales%" .. code-block:: xml + - @@ -40,6 +41,7 @@ inside your routing configuration: .. code-block:: php + // app/config/routing.php use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; @@ -82,14 +84,15 @@ path): .. code-block:: yaml + # app/config/routing.yml some_route: path: /%acme_demo.route_prefix%/contact defaults: { _controller: AcmeDemoBundle:Main:contact } .. code-block:: xml + - @@ -101,6 +104,7 @@ path): .. code-block:: php + // app/config/routing.php use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; @@ -116,7 +120,7 @@ path): Just like in normal service container configuration files, if you actually need a ``%`` in your route, you can escape the percent sign by doubling it, e.g. ``/score-50%%``, which would resolve to ``/score-50%``. - + However, as the ``%`` characters included in any URL are automatically encoded, the resulting URL of this example would be ``/score-50%25`` (``%25`` is the result of encoding the ``%`` character).