Skip to content

Commit 9cd0221

Browse files
committed
Test issue 316
I don't think this can be easily fixed without a context-aware tokenizer. zordius/lightncandy#316
1 parent 52ef73a commit 9cd0221

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
use DevTheorem\Handlebars\{Handlebars, Options};
4+
5+
require 'vendor/autoload.php';
6+
7+
$templateString = '{{> StrongPartial text="Use the syntax: {{varName}}."}}';
8+
9+
$template = Handlebars::compile($templateString, new Options(
10+
partials: [
11+
'StrongPartial' => '<strong>{{text}}</strong>',
12+
]
13+
));
14+
15+
echo $template([
16+
'varName' => 'Hello',
17+
]);

0 commit comments

Comments
 (0)