From 38bc1a9ed9a92efd145b4f37d9de5a3443912798 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 22 Feb 2015 13:33:26 +0000 Subject: [PATCH] fhem.pl: # comments are not removed if they start in the middle of the line. git-svn-id: https://svn.fhem.de/fhem/trunk@8066 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/fhem.pl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 664ac6988..c40b1c30c 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: # comments in fhem.cfg are only removed at the line-start - feature: set command modifyTimeSpec for at, to be used in webCmd - added: New module 71_PHILIPS_AUDIO.pm for Philips MCi, Streamium and Fidelio devices. diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 473c16ad2..a0192f3a5 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -853,7 +853,7 @@ AnalyzeCommandChain($$;$) return undef; } - $cmd =~ s/#.*$//s; + $cmd =~ s/^\s*#.*$//s; # Remove comments at the beginning of the line $cmd =~ s/;;/SeMiCoLoN/g; my @saveCmdList = @cmdList; # Needed for recursive calls