lightncandy
lightncandy copied to clipboard
Subexpression with a string where zero spaces occur before parenthesis breaks Parser
The PHP Code:
require('../vendor/autoload.php');
use LightnCandy\LightnCandy;
// The Template:
$template = <<<VAREND
{{{debug (debug 'foobar(moo).')}}}
VAREND;
$phpStr = LightnCandy::compile($template, array(
'flags' => LightnCandy::FLAG_HANDLEBARS | LightnCandy::FLAG_ERROR_EXCEPTION
));
echo "Generated PHP Code:\n$phpStr\n";
The Issue:
The issue is very similar to #281 and #295. The error message is Error in 'echo (echo "foobar(moo).")': expect ')' but the token ended!!.
This is now fixed in the latest release of https://github.com/devtheorem/php-handlebars.