allow spacesin templateDef info

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@3517 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2013-07-28 09:39:58 +00:00
parent c73d7d3b81
commit 6f58c41fd0

View File

@@ -776,11 +776,14 @@ sub HMinfo_templateDef(@){#####################################################
}
# get description if marked wir ""
if ($desc =~ m/^"/){
my $cnt = 0;
foreach (@regs){
$desc .= " ".(shift @regs);
$desc .= " ".$_;
$cnt++;
last if ($desc =~ m/"$/);
}
$desc =~ s/"//g;
splice @regs,0,$cnt;
}
return "$name already defined, delete it first" if($tpl{$name});