From 77a0e291cc84851f1171ce382cd52513cae77836 Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 13 Feb 2003 17:58:19 +0000 Subject: [PATCH] allow dash in plain text --- Smarty_Compiler.class.php | 2 +- docs/designers.sgml | 4 ++-- libs/Smarty_Compiler.class.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 35377586..95201878 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -1358,7 +1358,7 @@ class Smarty_Compiler extends Smarty { $token = true; } else if (preg_match('!^(off|no|false)$!', $token)) { $token = false; - } else if (preg_match('!^[\w\.]+$!', $token)) { + } else if (preg_match('!^[\w\.-]+$!', $token)) { /* If the token is just a string, we double-quote it. */ $token = '"'.$token.'"'; diff --git a/docs/designers.sgml b/docs/designers.sgml index 0148e2f6..e812b6ea 100644 --- a/docs/designers.sgml +++ b/docs/designers.sgml @@ -2985,8 +2985,8 @@ The value of $name is Bob. count on each iteration. You can adjust the number, the interval and the direction of the count, as well as determine whether or not 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 - name 'default' will be used. + supplying a unique name for each one. If you do not supply a name, + the name 'default' will be used. If you supply the special "assign" attribute, the output of the diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 35377586..95201878 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1358,7 +1358,7 @@ class Smarty_Compiler extends Smarty { $token = true; } else if (preg_match('!^(off|no|false)$!', $token)) { $token = false; - } else if (preg_match('!^[\w\.]+$!', $token)) { + } else if (preg_match('!^[\w\.-]+$!', $token)) { /* If the token is just a string, we double-quote it. */ $token = '"'.$token.'"';