diff pspx.html @ 5:31bb8400e6e3 draft

Add #end header, fix #errors.
author David Barts <n5jrn@me.com>
date Mon, 13 May 2019 14:47:04 -0700
parents c6902cded64d
children a3823da7bb45
line wrap: on
line diff
--- a/pspx.html	Mon May 13 12:38:26 2019 -0700
+++ b/pspx.html	Mon May 13 14:47:04 2019 -0700
@@ -17,10 +17,15 @@
       (#) character. With the exception of the <code>#rem </code>header, all
       header lines may appear only once in a given file.</p>
     <dl>
+      <dt><code>#end</code></dt>
+      <dd>Marks the last line of the headers. Needed only for templating
+        languages where lines often start with <span class="kbd">#</span>, such
+        as Cheetah.</dd>
+      <dd> <br>
+      </dd>
       <dt><code>#errors</code></dt>
-      <dd>Ignore other headers and make this is an error page which handles
-        the specified HTTP error codes. See the subsection on error pages below.
-      </dd>
+      <dd>Ignore other headers and make this is an error page which handles the
+        specified HTTP error codes. See the subsection on error pages below. </dd>
       <dt><code>#forward</code></dt>
       <dd>Ignore everything else in this template (and any code-behind
         associated with it), using the specified route to serve it instead. The
@@ -34,9 +39,9 @@
       <dd>This is a hidden page; do not create a route for it. The page can only
         be displayed by a forward.</dd>
       <dt><code>#methods</code></dt>
-      <dd>A list of HTTP request methods, separated by whitespace, follows. The route will
-        allow all specified methods. Not specifying this line is equivalent to
-        specifying <code>#methods GET</code>.</dd>
+      <dd>A list of HTTP request methods, separated by whitespace, follows. The
+        route will allow all specified methods. Not specifying this line is
+        equivalent to specifying <code>#methods GET</code>.</dd>
       <dt><code>#python</code></dt>
       <dd>What follows is the name of the Python file containing the code-behind
         for this route. If not specified, the code-behind will be in a file with
@@ -58,16 +63,16 @@
         associated code-behind;</em> they consist of templates only. Error page
       templates are provided with two variables when rendering:</p>
     <dl>
-      <dt><code>e</code></dt>
+      <dt><code>error</code></dt>
       <dd>The <code>bottle.HTTPError</code> object associated with this error.</dd>
       <dt><code>request</code></dt>
       <dd>The <code>bottle.Request</code> object associated with this error.</dd>
     </dl>
     <p>The <code>#errors</code> directive takes a list of numeric error codes
-    (values from 400 to 599 are allowed); the page is created to handle the
-    specified errors. If no error codes are specified, the page will handle all
-    errors. The behavior of specifying multiple error pages for the same error code
-    is undefined; doing so is best avoided.</p>
+      (values from 400 to 599 are allowed); the page is created to handle the
+      specified errors. If no error codes are specified, the page will handle
+      all errors. The behavior of specifying multiple error pages for the same
+      error code is undefined; doing so is best avoided.</p>
     <h2>The Body</h2>
     <p>The body begins with the first line that <em>does not</em> start with <code>#</code>
       and has the exact same syntax that the templates are in for this webapp.