Skip to content

Instantly share code, notes, and snippets.

@jazzdan
Created June 18, 2014 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazzdan/cead6a75768027b742a9 to your computer and use it in GitHub Desktop.
Save jazzdan/cead6a75768027b742a9 to your computer and use it in GitHub Desktop.
mustache.rb throws an exception
require 'mustache'
output = Mustache.render("<h1>{{{blah}}</h1>", :blah=> "hello world!")
puts output
# =>
#/Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache/parser.rb:264:in `error': Unclosed tag (Mustache::Parser::SyntaxError)
# Line 1
# <h1>{{{blah}}</h1>
# ^
# from /Users/dmiller/.rbenv/versions/1.9.2-p18080/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache/parser.rb:189:in `scan_tags'
# from /Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustacheache-0.99.5/lib/mustache/parser.rb:94:in `compile'
# from /Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache/template.rb:55:in `tokens'
# from /Users/dmiller/.rbenv/versions/1.9.2-p1800/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache/template.rb:49:in `compile'
# from /Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustachee-0.99.5/lib/mustache/template.rb:35:in `render'
# from /Users/dmiller/.dmillerrbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache.rb:123:in `render'
# from /Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/rubygems/1.9.1/gems/mustache-0.99.5/lib/mustache.rb:84:in `render'
# from mustachestache.rb:3:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment