Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Warnings with parameters in yaml-blocks. #32

Closed
temp opened this issue Feb 24, 2016 · 5 comments
Closed

Warnings with parameters in yaml-blocks. #32

temp opened this issue Feb 24, 2016 · 5 comments

Comments

@temp
Copy link

temp commented Feb 24, 2016

Example:

.. code-block:: yaml

    test: %my_parameter%

Results in:

WARNING: Could not parse literal_block as "yaml". highlighting skipped.
@lyrixx
Copy link

lyrixx commented Feb 24, 2016

IIRC, you have to surround the value with double quote " because it contains %

@temp
Copy link
Author

temp commented Feb 24, 2016

You don't have to. At least in symfony 2.8 there is no error if you omit the double quotes.
And what if the parameter is an integer? Will this have implications if I use double quotes?

@lyrixx
Copy link

lyrixx commented Feb 24, 2016

See Example 5.10. Invalid use of Reserved Indicators in http://yaml.org/spec/1.2/spec.html

@xabbuh
Copy link
Contributor

xabbuh commented Feb 24, 2016

Indeed, and starting with Symfony 3.1 this is also deprecated (see symfony/symfony#17809) and will be removed in Symfony 4.0.

@temp
Copy link
Author

temp commented Feb 24, 2016

Ok, thanks for the info!

@temp temp closed this as completed Feb 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants