mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
allow dash in plain text
This commit is contained in:
@@ -1358,7 +1358,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
$token = true;
|
$token = true;
|
||||||
} else if (preg_match('!^(off|no|false)$!', $token)) {
|
} else if (preg_match('!^(off|no|false)$!', $token)) {
|
||||||
$token = false;
|
$token = false;
|
||||||
} else if (preg_match('!^[\w\.]+$!', $token)) {
|
} else if (preg_match('!^[\w\.-]+$!', $token)) {
|
||||||
/* If the token is just a string,
|
/* If the token is just a string,
|
||||||
we double-quote it. */
|
we double-quote it. */
|
||||||
$token = '"'.$token.'"';
|
$token = '"'.$token.'"';
|
||||||
|
@@ -2985,8 +2985,8 @@ The value of $name is Bob.</programlisting>
|
|||||||
count on each iteration. You can adjust the number, the interval
|
count on each iteration. You can adjust the number, the interval
|
||||||
and the direction of the count, as well as determine whether or not
|
and the direction of the count, as well as determine whether or not
|
||||||
to print the value. You can run multiple counters concurrently by
|
to print the value. You can run multiple counters concurrently by
|
||||||
supplying a unique id for each one. If you do not supply a name, the
|
supplying a unique name for each one. If you do not supply a name,
|
||||||
name 'default' will be used.
|
the name 'default' will be used.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If you supply the special "assign" attribute, the output of the
|
If you supply the special "assign" attribute, the output of the
|
||||||
|
@@ -1358,7 +1358,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
$token = true;
|
$token = true;
|
||||||
} else if (preg_match('!^(off|no|false)$!', $token)) {
|
} else if (preg_match('!^(off|no|false)$!', $token)) {
|
||||||
$token = false;
|
$token = false;
|
||||||
} else if (preg_match('!^[\w\.]+$!', $token)) {
|
} else if (preg_match('!^[\w\.-]+$!', $token)) {
|
||||||
/* If the token is just a string,
|
/* If the token is just a string,
|
||||||
we double-quote it. */
|
we double-quote it. */
|
||||||
$token = '"'.$token.'"';
|
$token = '"'.$token.'"';
|
||||||
|
Reference in New Issue
Block a user