Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix highlighting of snippet in recipes doc

  • Loading branch information...
commit 0580f192ca370256882b1607acb6ae2d70d12616 1 parent f918219
@igorw igorw authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 doc/recipes.rst
View
14 doc/recipes.rst
@@ -246,14 +246,14 @@ Validating the Template Syntax
When template code is providing by a third-party (through a web interface for
instance), it might be interesting to validate the template syntax before
saving it. If the template code is stored in a `$template` variable, here is
-how you can do it:
+how you can do it::
-try {
- $twig->parse($twig->tokenize($template));
+ try {
+ $twig->parse($twig->tokenize($template));
- // the $template is valid
-} catch (Twig_Error_Syntax $e) {
- // $template contains one or more syntax errors
-}
+ // the $template is valid
+ } catch (Twig_Error_Syntax $e) {
+ // $template contains one or more syntax errors
+ }
.. _callback: http://www.php.net/manual/en/function.is-callable.php
Please sign in to comment.
Something went wrong with that request. Please try again.