Uniformise ``.. sourcecode::`` indentations.
diff --git a/doc/build/caching.rst b/doc/build/caching.rst
index a87f525..e2d11d2 100644
--- a/doc/build/caching.rst
+++ b/doc/build/caching.rst
@@ -328,8 +328,8 @@
.. sourcecode:: python
t = Template("mytemplate",
- file="mytemplate.html",
- cache_impl='simple')
+ file="mytemplate.html",
+ cache_impl='simple')
Guidelines for Writing Cache Plugins
------------------------------------
diff --git a/doc/build/defs.rst b/doc/build/defs.rst
index 1d55df8..bd3aa08 100644
--- a/doc/build/defs.rst
+++ b/doc/build/defs.rst
@@ -353,21 +353,21 @@
.. sourcecode:: html
<table>
- <tr>
- <td>Body data: 1</td>
- <td>Body data: 2</td>
- <td>Body data: 3</td>
- </tr>
- <tr>
- <td>Body data: 4</td>
- <td>Body data: 5</td>
- <td>Body data: 6</td>
- </tr>
- <tr>
- <td>Body data: 7</td>
- <td>Body data: 8</td>
- <td>Body data: 9</td>
- </tr>
+ <tr>
+ <td>Body data: 1</td>
+ <td>Body data: 2</td>
+ <td>Body data: 3</td>
+ </tr>
+ <tr>
+ <td>Body data: 4</td>
+ <td>Body data: 5</td>
+ <td>Body data: 6</td>
+ </tr>
+ <tr>
+ <td>Body data: 7</td>
+ <td>Body data: 8</td>
+ <td>Body data: 9</td>
+ </tr>
</table>
You don't have to stick to calling just the ``body()`` function.
@@ -413,20 +413,20 @@
.. sourcecode:: html
<div class="mainlayout">
- <div class="header">
- I am the header
- </div>
+ <div class="header">
+ I am the header
+ </div>
- <div class="sidebar">
- <ul>
- <li>sidebar 1</li>
- <li>sidebar 2</li>
- </ul>
- </div>
+ <div class="sidebar">
+ <ul>
+ <li>sidebar 1</li>
+ <li>sidebar 2</li>
+ </ul>
+ </div>
- <div class="content">
- this is the body
- </div>
+ <div class="content">
+ this is the body
+ </div>
</div>
The number of things you can do with ``<%call>`` and/or the
diff --git a/doc/build/filtering.rst b/doc/build/filtering.rst
index ba45d1a..5be010c 100644
--- a/doc/build/filtering.rst
+++ b/doc/build/filtering.rst
@@ -134,8 +134,8 @@
.. sourcecode:: python
t = TemplateLookup(directories=['/tmp'],
- default_filters=['unicode', 'myfilter'],
- imports=['from mypackage import myfilter'])
+ default_filters=['unicode', 'myfilter'],
+ imports=['from mypackage import myfilter'])
The above will generate templates something like this:
diff --git a/doc/build/runtime.rst b/doc/build/runtime.rst
index 980b8a4..ff71fe8 100644
--- a/doc/build/runtime.rst
+++ b/doc/build/runtime.rst
@@ -229,31 +229,31 @@
.. sourcecode:: mako
- <ul>
- % for i, item in enumerate(('spam', 'ham', 'eggs')):
- <li class="${'odd' if i % 2 else 'even'}">${item}</li>
- % endfor
- </ul>
+ <ul>
+ % for i, item in enumerate(('spam', 'ham', 'eggs')):
+ <li class="${'odd' if i % 2 else 'even'}">${item}</li>
+ % endfor
+ </ul>
With ``loop.cycle``, you get the same results with cleaner code and less prep work:
.. sourcecode:: mako
- <ul>
- % for item in ('spam', 'ham', 'eggs'):
- <li class="${loop.cycle('even', 'odd')}">${item}</li>
- % endfor
- </ul>
+ <ul>
+ % for item in ('spam', 'ham', 'eggs'):
+ <li class="${loop.cycle('even', 'odd')}">${item}</li>
+ % endfor
+ </ul>
Both approaches produce output like the following:
.. sourcecode:: html
- <ul>
- <li class="even">spam</li>
- <li class="odd">ham</li>
- <li class="even">eggs</li>
- </ul>
+ <ul>
+ <li class="even">spam</li>
+ <li class="odd">ham</li>
+ <li class="even">eggs</li>
+ </ul>
Parent Loops
------------
@@ -269,55 +269,55 @@
.. sourcecode:: mako
- <table>
- % for consonant in 'pbj':
- <tr>
- % for vowel in 'iou':
- <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
- ${consonant + vowel}t
- </td>
- % endfor
- </tr>
- % endfor
- </table>
+ <table>
+ % for consonant in 'pbj':
+ <tr>
+ % for vowel in 'iou':
+ <td class="${'black' if (loop.parent.even == loop.even) else 'red'}">
+ ${consonant + vowel}t
+ </td>
+ % endfor
+ </tr>
+ % endfor
+ </table>
.. sourcecode:: html
- <table>
- <tr>
- <td class="black">
- pit
- </td>
- <td class="red">
- pot
- </td>
- <td class="black">
- put
- </td>
- </tr>
- <tr>
- <td class="red">
- bit
- </td>
- <td class="black">
- bot
- </td>
- <td class="red">
- but
- </td>
- </tr>
- <tr>
- <td class="black">
- jit
- </td>
- <td class="red">
- jot
- </td>
- <td class="black">
- jut
- </td>
- </tr>
- </table>
+ <table>
+ <tr>
+ <td class="black">
+ pit
+ </td>
+ <td class="red">
+ pot
+ </td>
+ <td class="black">
+ put
+ </td>
+ </tr>
+ <tr>
+ <td class="red">
+ bit
+ </td>
+ <td class="black">
+ bot
+ </td>
+ <td class="red">
+ but
+ </td>
+ </tr>
+ <tr>
+ <td class="black">
+ jit
+ </td>
+ <td class="red">
+ jot
+ </td>
+ <td class="black">
+ jut
+ </td>
+ </tr>
+ </table>
.. _migrating_loop: