Anonymous avatar Anonymous committed 9700726

Uniformise ``.. sourcecode::`` indentations.

Comments (0)

Files changed (4)

doc/build/caching.rst

 .. sourcecode:: python
 
     t = Template("mytemplate",
-                    file="mytemplate.html",
-                    cache_impl='simple')
+                 file="mytemplate.html",
+                 cache_impl='simple')
 
 Guidelines for Writing Cache Plugins
 ------------------------------------

doc/build/defs.rst

 .. 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.
 .. 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

doc/build/filtering.rst

 .. 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:
 

doc/build/runtime.rst

 
 .. 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
 ------------
 
 .. 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:
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.