Merge pull request #509 from jplusc/patch-1

minor typo in NEW_FEATURES.txt (setLiterals)
This commit is contained in:
uwetews
2018-11-11 09:16:56 +01:00
committed by GitHub

View File

@@ -35,13 +35,13 @@ Smarty 3.1.32
will be treated now as literal. (This does apply for any number of delimiter repeatations). will be treated now as literal. (This does apply for any number of delimiter repeatations).
However {{foo}} is not an literal but will be interpreted as a recursive Smarty tag. However {{foo}} is not an literal but will be interpreted as a recursive Smarty tag.
If you use If you use
$smarty->setLiteral(array('{{','}}')); $smarty->setLiterals(array('{{','}}'));
{{foo}} is now a literal as well. {{foo}} is now a literal as well.
NOTE: In the last example nested Smarty tags starting with '{{' or ending with '}}' will not NOTE: In the last example nested Smarty tags starting with '{{' or ending with '}}' will not
work any longer, but this should be very very raw occouring restriction. work any longer, but this should be very very raw occouring restriction.
B) Example 2 B) Example 2
Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be literals Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be literals
$smarty->setLiteral(array('<--','-->')); $smarty->setLiterals(array('<--','-->'));
The capture buffers can now be accessed as array The capture buffers can now be accessed as array