Skip to content

Commit dbc02a2

Browse files
committed
quote YAML strings starting with % or @ characters
Pygment uses the YAML 1.1 standard to parse YAML code being highlighted. A string value cannot start with the percent sign or the @ character in YAML 1.1 without being quoted. To highlight the YAML code blocks properly, strings starting with the percent sign are now enclosed in double quotes.
1 parent ba9632e commit dbc02a2

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

book/internals.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ If you enable the web profiler, you also need to mount the profiler routes:
621621
.. code-block:: yaml
622622
623623
_profiler:
624-
resource: @WebProfilerBundle/Resources/config/routing/profiler.xml
624+
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
625625
prefix: /_profiler
626626
627627
.. code-block:: xml

cookbook/configuration/using_parameters_in_dic.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Now, examine the results to see this closely:
3636
# true, as expected
3737
3838
my_bundle:
39-
logging: %kernel.debug%
39+
logging: "%kernel.debug%"
4040
# true/false (depends on 2nd parameter of AppKernel),
4141
# as expected, because %kernel.debug% inside configuration
4242
# gets evaluated before being passed to the extension

reference/configuration/doctrine.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Full default configuration
5959
MultipleActiveResultSets: ~
6060
driver: pdo_mysql
6161
platform_service: ~
62-
logging: %kernel.debug%
63-
profiling: %kernel.debug%
62+
logging: "%kernel.debug%"
63+
profiling: "%kernel.debug%"
6464
driver_class: ~
6565
wrapper_class: ~
6666
options:
@@ -106,7 +106,7 @@ Full default configuration
106106
orm:
107107
default_entity_manager: ~
108108
auto_generate_proxy_classes: false
109-
proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies
109+
proxy_dir: "%kernel.cache_dir%/doctrine/orm/Proxies"
110110
proxy_namespace: Proxies
111111
# search for the "ResolveTargetEntityListener" class for a cookbook about this
112112
resolve_target_entities: []
@@ -416,7 +416,7 @@ Shortened Configuration Syntax
416416
------------------------------
417417

418418
When you are only using one entity manager, all config options available
419-
can be placed directly under ``doctrine.orm`` config level.
419+
can be placed directly under ``doctrine.orm`` config level.
420420

421421
.. code-block:: yaml
422422

reference/configuration/framework.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,19 @@ have installed `PhpStormOpener`_ and use PHPstorm, you will do something like:
103103
104104
framework:
105105
ide: "pstorm://%%f:%%l"
106-
106+
107107
.. code-block:: xml
108-
108+
109109
<?xml version="1.0" charset="UTF-8" ?>
110110
<container xmlns="http://symfony.com/schema/dic/service"
111111
xmlns:framework="http://symfony.com/schema/dic/symfony">
112-
112+
113113
<framework:config ide="pstorm://%%f:%%l" />
114-
114+
115115
</container>
116-
116+
117117
.. code-block:: php
118-
118+
119119
$container->loadFromExtension('framework', array(
120120
'ide' => 'pstorm://%%f:%%l',
121121
));
@@ -536,7 +536,7 @@ Full default Configuration
536536
gc_divisor: ~
537537
gc_probability: ~
538538
gc_maxlifetime: ~
539-
save_path: %kernel.cache_dir%/sessions
539+
save_path: "%kernel.cache_dir%/sessions"
540540
541541
# serializer configuration
542542
serializer:
@@ -545,7 +545,7 @@ Full default Configuration
545545
# templating configuration
546546
templating:
547547
assets_version: ~
548-
assets_version_format: %%s?%%s
548+
assets_version_format: "%%s?%%s"
549549
hinclude_default_template: ~
550550
form:
551551
resources:
@@ -566,7 +566,7 @@ Full default Configuration
566566
# Prototype
567567
name:
568568
version: ~
569-
version_format: %%s?%%s
569+
version_format: "%%s?%%s"
570570
base_urls:
571571
http: []
572572
ssl: []
@@ -586,8 +586,8 @@ Full default Configuration
586586
# annotation configuration
587587
annotations:
588588
cache: file
589-
file_cache_dir: %kernel.cache_dir%/annotations
590-
debug: %kernel.debug%
589+
file_cache_dir: "%kernel.cache_dir%/annotations"
590+
debug: "%kernel.debug%"
591591
592592
.. _`protocol-relative`: http://tools.ietf.org/html/rfc3986#section-4.2
593593
.. _`PhpStormOpener`: https://github.com/pinepain/PhpStormOpener

0 commit comments

Comments
 (0)