From: Fabien Potencier Date: Fri, 27 Apr 2012 15:49:39 +0000 (+0200) Subject: fixed markup in the doc X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=5923f0cbad1c051bdd6aa5748977bb08a822f173;p=web%2Fkonrad%2Ftwig.git fixed markup in the doc --- diff --git a/doc/advanced.rst b/doc/advanced.rst index 6f3e750..1864a9e 100644 --- a/doc/advanced.rst +++ b/doc/advanced.rst @@ -486,8 +486,10 @@ developer generate beautiful and readable PHP code: * ``outdent()``: Outdents the generated code (see ``Twig_Node_Block`` for a usage example). -Creating a Twig Extension -------------------------- +.. _creating_extensions: + +Creating an Extension +--------------------- The main motivation for writing an extension is to move often used code into a reusable class like adding support for internationalization. An extension can diff --git a/doc/api.rst b/doc/api.rst index 7feec89..96bb6ed 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -330,7 +330,7 @@ escaping strategy), except those using the ``raw`` filter: {{ article.to_html|raw }} You can also change the escaping mode locally by using the ``autoescape`` tag -(see the :doc:`autoescape<../tags/autoescape>` doc for the syntax used before +(see the :doc:`autoescape` doc for the syntax used before Twig 1.8): .. code-block:: jinja diff --git a/doc/index.rst b/doc/index.rst index 55517ea..56012f7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,8 +8,7 @@ Twig templates api advanced - extensions - hacking + internals recipes coding_standards tags/index diff --git a/doc/recipes.rst b/doc/recipes.rst index 34ae1f9..59a6dfb 100644 --- a/doc/recipes.rst +++ b/doc/recipes.rst @@ -324,7 +324,7 @@ Using the Template name to set the default Escaping Strategy The ``autoescape`` option determines the default escaping strategy to use when no escaping is applied on a variable. When Twig is used to mostly generate HTML files, you can set it to ``html`` and explicitly change it to ``js`` when -you have some dynamic JavaScript files thanks to the ``autoescape`` tag:: +you have some dynamic JavaScript files thanks to the ``autoescape`` tag: .. code-block:: jinja diff --git a/doc/templates.rst b/doc/templates.rst index 8813c6d..bb2e435 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -710,7 +710,8 @@ Twig can be easily extended. If you are looking for new tags, filters, or functions, have a look at the Twig official `extension repository`_. -If you want to create your own, read :doc:`extensions`. +If you want to create your own, read the :ref:`Creating an +Extension` chapter. .. _`Twig bundle`: https://github.com/Anomareh/PHP-Twig.tmbundle .. _`Jinja syntax plugin`: http://jinja.pocoo.org/2/documentation/integration