Permalink
Browse files

GitHub Flavored Markdown

  • Loading branch information...
1 parent b5c4640 commit c3116bd1d5125da392380bc759a9950e94368d96 @groue committed Mar 5, 2012
Showing with 14 additions and 10 deletions.
  1. +14 −10 README.md
View
@@ -39,19 +39,23 @@ GRMustache rendering is the combination of a template string and of an object th
You can render templates on the fly:
- #import "GRMustache.h"
-
- NSString *templateString = @"Hello {{name}}!";
- Person *arthur = [Person personWithName:@"Arthur"];
-
- // Renders "Hello Arthur!"
- NSString *rendering = [GRMustacheTemplate renderObject:arthur fromString:templateString error:NULL];
+```objc
+#import "GRMustache.h"
+
+NSString *templateString = @"Hello {{name}}!";
+Person *arthur = [Person personWithName:@"Arthur"];
+
+// Renders "Hello Arthur!"
+NSString *rendering = [GRMustacheTemplate renderObject:arthur fromString:templateString error:NULL];
+```
You can also parse a template once, and render it many times.
- GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL];
- rendering = [template renderObject:arthur];
- rendering = [template renderObject:...];
+```objc
+GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL];
+rendering = [template renderObject:arthur];
+rendering = [template renderObject:...];
+```
Speaking of templates, GRMustache eats many kinds of them: files and bundle resources as well as raw strings. For more information, check [guides/templates.md](GRMustache/blob/master/guides/templates.md).

0 comments on commit c3116bd

Please sign in to comment.