Template code Chunk output
{#example_1}
<pre>
{$block_of_text}
</pre>

<pre>
{$block_of_text|indent(5)}
</pre>
{#}
Theme theme = new Theme("examples");

// Fetch template from this file: themes/examples/indent.chtml
// Inside that file there is a template "snippet" named #example_1
Chunk html = theme.makeChunk("indent#example_1");

html.set("block_of_text", theme.fetch("indent#ascii_earth"));

html.render( out );
<pre>
               ,,ggddY"""Ybbgg,,
          ,agd888b,_ "Y8, ___`""Ybga,
       ,gdP""88888888baa,.""8b    "888g,
     ,dP"     ]888888888P'  "Y     `888Yb,
   ,dP"      ,88888888P"  db,       "8P""Yb,
  ,8"       ,888888888b, d8888a           "8,
 ,8'        d88888888888,88P"' a,          `8,
,8'         88888888888888PP"  ""           `8,
d'          I88888888888P"                   `b
8           `8"88P""Y8P'                      8
8            Y 8[  _ "                        8
8              "Y8d8b  "Y a                   8
8                 `""8d,   __                 8
Y,                    `"8bd888b,             ,P
`8,                     ,d8888888baaa       ,8'
 `8,                    888888888888'      ,8'
  `8a                   "8888888888I      a8'
   `Yba                  `Y8888888P'    adP'
     "Yba                 `888888P'   adY"
       `"Yba,             d8888P" ,adP"'  Normand Veilleux
          `"Y8baa,      ,d888P,ad8P"'           from
               ``""YYba8888P""''          Spaceship Earth

</pre>

<pre>
                    ,,ggddY"""Ybbgg,,
               ,agd888b,_ "Y8, ___`""Ybga,
            ,gdP""88888888baa,.""8b    "888g,
          ,dP"     ]888888888P'  "Y     `888Yb,
        ,dP"      ,88888888P"  db,       "8P""Yb,
       ,8"       ,888888888b, d8888a           "8,
      ,8'        d88888888888,88P"' a,          `8,
     ,8'         88888888888888PP"  ""           `8,
     d'          I88888888888P"                   `b
     8           `8"88P""Y8P'                      8
     8            Y 8[  _ "                        8
     8              "Y8d8b  "Y a                   8
     8                 `""8d,   __                 8
     Y,                    `"8bd888b,             ,P
     `8,                     ,d8888888baaa       ,8'
      `8,                    888888888888'      ,8'
       `8a                   "8888888888I      a8'
        `Yba                  `Y8888888P'    adP'
          "Yba                 `888888P'   adY"
            `"Yba,             d8888P" ,adP"'  Normand Veilleux
               `"Y8baa,      ,d888P,ad8P"'           from
                    ``""YYba8888P""''          Spaceship Earth

</pre>

               ,,ggddY"""Ybbgg,,
          ,agd888b,_ "Y8, ___`""Ybga,
       ,gdP""88888888baa,.""8b    "888g,
     ,dP"     ]888888888P'  "Y     `888Yb,
   ,dP"      ,88888888P"  db,       "8P""Yb,
  ,8"       ,888888888b, d8888a           "8,
 ,8'        d88888888888,88P"' a,          `8,
,8'         88888888888888PP"  ""           `8,
d'          I88888888888P"                   `b
8           `8"88P""Y8P'                      8
8            Y 8[  _ "                        8
8              "Y8d8b  "Y a                   8
8                 `""8d,   __                 8
Y,                    `"8bd888b,             ,P
`8,                     ,d8888888baaa       ,8'
 `8,                    888888888888'      ,8'
  `8a                   "8888888888I      a8'
   `Yba                  `Y8888888P'    adP'
     "Yba                 `888888P'   adY"
       `"Yba,             d8888P" ,adP"'  Normand Veilleux
          `"Y8baa,      ,d888P,ad8P"'           from
               ``""YYba8888P""''          Spaceship Earth

                    ,,ggddY"""Ybbgg,,
               ,agd888b,_ "Y8, ___`""Ybga,
            ,gdP""88888888baa,.""8b    "888g,
          ,dP"     ]888888888P'  "Y     `888Yb,
        ,dP"      ,88888888P"  db,       "8P""Yb,
       ,8"       ,888888888b, d8888a           "8,
      ,8'        d88888888888,88P"' a,          `8,
     ,8'         88888888888888PP"  ""           `8,
     d'          I88888888888P"                   `b
     8           `8"88P""Y8P'                      8
     8            Y 8[  _ "                        8
     8              "Y8d8b  "Y a                   8
     8                 `""8d,   __                 8
     Y,                    `"8bd888b,             ,P
     `8,                     ,d8888888baaa       ,8'
      `8,                    888888888888'      ,8'
       `8a                   "8888888888I      a8'
        `Yba                  `Y8888888P'    adP'
          "Yba                 `888888P'   adY"
            `"Yba,             d8888P" ,adP"'  Normand Veilleux
               `"Y8baa,      ,d888P,ad8P"'           from
                    ``""YYba8888P""''          Spaceship Earth

Template code Chunk output
{#example_2}
{!-- indent filter has an optional second arg (the indent string) --}
<pre>
{$block_of_text|indent(3,:.)}
</pre>
{#}
Theme theme = new Theme("examples");

// Fetch template from this file: themes/examples/indent.chtml
// Inside that file there is a template "snippet" named #example_1
Chunk html = theme.makeChunk("indent#example_1");

html.set("block_of_text", theme.fetch("indent#ascii_earth"));

html.render( out );
<pre>
:.:.:.               ,,ggddY"""Ybbgg,,
:.:.:.          ,agd888b,_ "Y8, ___`""Ybga,
:.:.:.       ,gdP""88888888baa,.""8b    "888g,
:.:.:.     ,dP"     ]888888888P'  "Y     `888Yb,
:.:.:.   ,dP"      ,88888888P"  db,       "8P""Yb,
:.:.:.  ,8"       ,888888888b, d8888a           "8,
:.:.:. ,8'        d88888888888,88P"' a,          `8,
:.:.:.,8'         88888888888888PP"  ""           `8,
:.:.:.d'          I88888888888P"                   `b
:.:.:.8           `8"88P""Y8P'                      8
:.:.:.8            Y 8[  _ "                        8
:.:.:.8              "Y8d8b  "Y a                   8
:.:.:.8                 `""8d,   __                 8
:.:.:.Y,                    `"8bd888b,             ,P
:.:.:.`8,                     ,d8888888baaa       ,8'
:.:.:. `8,                    888888888888'      ,8'
:.:.:.  `8a                   "8888888888I      a8'
:.:.:.   `Yba                  `Y8888888P'    adP'
:.:.:.     "Yba                 `888888P'   adY"
:.:.:.       `"Yba,             d8888P" ,adP"'  Normand Veilleux
:.:.:.          `"Y8baa,      ,d888P,ad8P"'           from
:.:.:.               ``""YYba8888P""''          Spaceship Earth

</pre>

:.:.:.               ,,ggddY"""Ybbgg,,
:.:.:.          ,agd888b,_ "Y8, ___`""Ybga,
:.:.:.       ,gdP""88888888baa,.""8b    "888g,
:.:.:.     ,dP"     ]888888888P'  "Y     `888Yb,
:.:.:.   ,dP"      ,88888888P"  db,       "8P""Yb,
:.:.:.  ,8"       ,888888888b, d8888a           "8,
:.:.:. ,8'        d88888888888,88P"' a,          `8,
:.:.:.,8'         88888888888888PP"  ""           `8,
:.:.:.d'          I88888888888P"                   `b
:.:.:.8           `8"88P""Y8P'                      8
:.:.:.8            Y 8[  _ "                        8
:.:.:.8              "Y8d8b  "Y a                   8
:.:.:.8                 `""8d,   __                 8
:.:.:.Y,                    `"8bd888b,             ,P
:.:.:.`8,                     ,d8888888baaa       ,8'
:.:.:. `8,                    888888888888'      ,8'
:.:.:.  `8a                   "8888888888I      a8'
:.:.:.   `Yba                  `Y8888888P'    adP'
:.:.:.     "Yba                 `888888P'   adY"
:.:.:.       `"Yba,             d8888P" ,adP"'  Normand Veilleux
:.:.:.          `"Y8baa,      ,d888P,ad8P"'           from
:.:.:.               ``""YYba8888P""''          Spaceship Earth