If you pass an empty string to Handlebars.apply, it results in a parse error:
scala> import com.gilt.handlebars.Handlebars
import com.gilt.handlebars.Handlebars
scala> Handlebars("")
java.lang.RuntimeException: Could not parse template:
scala.util.parsing.input.CharSequenceReader@673c8b91
at scala.sys.package$.error(package.scala:27)
at com.gilt.handlebars.parser.ProgramHelper$$anonfun$programFromString$1.apply(ProgramHelper.scala:12)
at com.gilt.handlebars.parser.ProgramHelper$$anonfun$programFromString$1.apply(ProgramHelper.scala:12)
at scala.util.parsing.combinator.Parsers$ParseResult.getOrElse(Parsers.scala:123)
at com.gilt.handlebars.parser.ProgramHelper$class.programFromString(ProgramHelper.scala:11)
at com.gilt.handlebars.DefaultHandlebarsBuilder$.programFromString(HandlebarsBuilder.scala:32)
at com.gilt.handlebars.DefaultHandlebarsBuilder$.apply(HandlebarsBuilder.scala:34)
at com.gilt.handlebars.Handlebars$.createBuilder(Handlebars.scala:40)
at com.gilt.handlebars.Handlebars$.apply(Handlebars.scala:37)
If you pass an empty string to
Handlebars.apply
, it results in a parse error: