justjohn/twig.js — pull request #95 by adamdicarlo (2013-05-20 05:25:02+00:00)
Title: Odd number of apostrophes inside comments cause "Unclosed string in template" exception

Here's an example:

> Twig.exports.twig({ data: "{# Don't blink. #}<span>Hi</span>" })
> "Unclosed string in template"

Even more troubling, comments can gobble up template content between them:

> Twig.exports.twig({ data: "{# Don't blink. #}<span>Hi</span>{# Don't blink. #}" }).render()
> ""