Merge pull request #24 from kattrali/patch-1

Fix title typo
This commit is contained in:
Kyle Fuller
2015-08-24 02:23:22 -07:00

View File

@@ -92,7 +92,7 @@ Will result in a single Node (a `ForNode`) which contains the sub-node containin
When the `ForNode` is rendered in a context, it will look up the variable `articles` and if its an array it will loop over it. Inserting the variable `article` into the context while rendered the `forNodes` for each article.
### Custom Nodes
### Custom Nodes
There are two ways to register custom template tags. A simple way which allows you to map 1:1 a block token to a Node. You can also register a more advanced template tag which has its own block of code for handling parsing if you want to parse up until another token such as if you are trying to provide flow-control.
@@ -177,4 +177,4 @@ parser.registerTag("debug") { (parser, token) -> TokenParser.Result in
## Context
A Context is a structure containing any templates you would like to use in a template. Its somewhat like a dictionary, however you can push and pop to scope variables. So that means that when iterating over a for loop, you can push a new scope into the context to store any variables local to the scope.
A Context is a structure containing any templates you would like to use in a template. Its somewhat like a dictionary, however you can push and pop to scope variables. So that means that when iterating over a for loop, you can push a new scope into the context to store any variables local to the scope.