Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Mar 25, 2013
2 parents 30377dd + 02be9c8 commit 331e4f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Demo/Twig/JsonStringifyExtension.php
Expand Up @@ -21,7 +21,7 @@ public function jsonStringify($json)
}
$pattern = array(',"', '{', '}');
$replacement = array(",\n\t\"", "{\n\t", "\n}");
return str_replace($pattern, $replacement, $string);
return str_replace($pattern, $replacement, json_encode($json));
}

public function getName()
Expand Down

0 comments on commit 331e4f8

Please sign in to comment.