Maytag Metalark avatar Maytag Metalark committed fdaf928

More tutorial work.

Comments (0)

Files changed (1)

templ/tutorial.templ

                 "hello, {echo templ}!"
             }
 
-            {section "Get Used to Curly Braces!" {'
+            {section "Get Used to Curly Braces" {'
                 {p
 <<<Ok, still pretty boring, but at least now we're actually writing {templ} code. There's a couple important things to notice in
 this example. For one thing, the format for invoking a function may not be what you're used to in most other languages. {templ}
 the argument {code "\"hello, templ!\""}, just like we had before.>>>
             }
 
-        }} % end section "...Processor"
+            {EXAMPLE-TEMPLATE "text"
+
+                {implode
+<<<Of course, we can continue nesting Lists as deeply as we want to come up with some truly obnoxious code like this:>>>
+                }
+
+                {implode
+<<<It's probably worth mentioning at this point that all of that whitespace I added this time around is irrelvant: {templ}
+requires a whitespace character to separate adjacent String elements in a List, but you are free to add as much additional
+whitespace as you'd like, it makes no difference to {templ}. This is helpful for structuring your code in a way that is
+somewhat easier to follow. You can see in the output below that all that whitespace hasn't changed anything:>>>
+                }
+
+"{echo
+    {glue
+        {glue h e \"l\"l\"o\"}
+        ,
+        \" \"
+        {glue 
+            {glue 
+                te mp 
+                {glue l e}
+            }
+            !
+        }
+    }
+}"
+            }
+
+            {p {'
+                {implode <<<A few general suggestions on formating your code:>>>}
+                {ul {'
+                    {implode                    
+<<<Keep the first element of a list (the one that specifies the executable to be invoked)
+on the same line as the opening curly brace, generally with no space separating it from the brace. This makes it much
+more obvious what is being invoked.>>>
+                    }
+                }}
+            }}
+
+        }} % end section "...Processing Routine"
 
     }} %end section "Introduction"
         
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.