mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Fixed formating.
This commit is contained in:
parent
a44777f52f
commit
4d5e433e61
@ -189,7 +189,7 @@ class Context
|
||||
*/
|
||||
public function get($variableName, $strict = false)
|
||||
{
|
||||
if ($variableName instanceof \Handlebars\String){
|
||||
if ($variableName instanceof \Handlebars\String) {
|
||||
return (string)$variableName;
|
||||
}
|
||||
$variableName = trim($variableName);
|
||||
|
@ -434,10 +434,10 @@ class Template
|
||||
preg_match_all('#(?<!\\\\)("|\')(?:[^\\\\]|\\\\.)*?\1|\S+#s', $string, $args);
|
||||
$args = isset($args[0])?$args[0]:array();
|
||||
|
||||
for($x=0, $argc = count($args); $x<$argc;$x++){
|
||||
for ($x=0, $argc = count($args); $x<$argc;$x++) {
|
||||
// check to see if argument is a quoted string literal
|
||||
if ($args[$x][0] == "'" || $args[$x][0] == '"'){
|
||||
if ($args[$x][0] === substr($args[$x], -1)){
|
||||
if ($args[$x][0] == "'" || $args[$x][0] == '"') {
|
||||
if ($args[$x][0] === substr($args[$x], -1)) {
|
||||
// remove enclosing quotes and unescape
|
||||
$args[$x] = new \Handlebars\String(stripcslashes(substr($args[$x], 1, strlen($args[$x]) -2)));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user