diff --git a/cookbook/assetic/apply_to_option.rst b/cookbook/assetic/apply_to_option.rst index 8d5cf98fac8..d4aadd468fc 100644 --- a/cookbook/assetic/apply_to_option.rst +++ b/cookbook/assetic/apply_to_option.rst @@ -60,7 +60,7 @@ templates: .. code-block:: html+jinja {% javascripts '@AcmeFooBundle/Resources/public/js/example.coffee' filter='coffee' %} - + {% endjavascripts %} .. code-block:: html+php @@ -69,7 +69,7 @@ templates: array('@AcmeFooBundle/Resources/public/js/example.coffee'), array('coffee') ) as $url): ?> - + This is all that's needed to compile this CoffeeScript file and serve it @@ -87,7 +87,7 @@ You can also combine multiple CoffeeScript files into a single output file: {% javascripts '@AcmeFooBundle/Resources/public/js/example.coffee' '@AcmeFooBundle/Resources/public/js/another.coffee' filter='coffee' %} - + {% endjavascripts %} .. code-block:: html+php @@ -99,7 +99,7 @@ You can also combine multiple CoffeeScript files into a single output file: ), array('coffee') ) as $url): ?> - + Both the files will now be served up as a single file compiled into regular @@ -118,7 +118,7 @@ adding the JavaScript files to the files to be combined as above will not work as the regular JavaScript files will not survive the CoffeeScript compilation. This problem can be avoided by using the ``apply_to`` option in the config, -which allows you to specify that a filter should always be applied to particular +which allows you to specify which filter should always be applied to particular file extensions. In this case you can specify that the ``coffee`` filter is applied to all ``.coffee`` files: @@ -173,7 +173,7 @@ being run through the CoffeeScript filter): {% javascripts '@AcmeFooBundle/Resources/public/js/example.coffee' '@AcmeFooBundle/Resources/public/js/another.coffee' '@AcmeFooBundle/Resources/public/js/regular.js' %} - + {% endjavascripts %} .. code-block:: html+php @@ -185,5 +185,5 @@ being run through the CoffeeScript filter): '@AcmeFooBundle/Resources/public/js/regular.js', ) ) as $url): ?> - +