Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created March 26, 2010 23:23
Show Gist options
  • Select an option

  • Save defunkt/345524 to your computer and use it in GitHub Desktop.

Select an option

Save defunkt/345524 to your computer and use it in GitHub Desktop.
<html>
<title>{{title}}</title>
</html>
$ cat hi.mustache
{{#begin}}
Hi {{world}}!
{{/end}}
$ mustache -t hi.mustache
Unclosed section "begin" (Mustache::Parser::SyntaxError)
Line 1
{{#begin}}
^
$ cat hi.mustache
Hi {{wor*ld}}!
$ mustache -t hi.mustache
Unclosed tag (Mustache::Parser::SyntaxError)
Line 1
Hi {{wor*ld}}!
^
$ echo '{{#greet?}}Hello {{name}}!{{/greet?}}' > hi.mustache
$ mustache -t hi.mustache
[:multi,
[:mustache,
:section,
"greet?",
[:multi, [:static, "Hello "], [:mustache, :etag, "name"],
[:static, "!"]]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment