[augeas-devel] Re: [PATCH] phpvars lens
Free Ekanayaka
free at 64studio.com
Wed Dec 24 09:28:36 UTC 2008
Hi David,
|--==> On Tue, 23 Dec 2008 17:24:11 -0800, David Lutterkort <lutter at redhat.com> said:
DL> On Sat, 2008-12-20 at 11:32 +0000, free at 64studio.com wrote:
>>commit 235549e7080e9d91d1086e9a84840cb8a217d8a8
>>Author: Free Ekanayaka <free at 64studio.com>
>>Date: Sat Dec 20 00:23:54 2008 +0000
>>
>>Add lens and test for config files using PHP-style variables, like /etc/squirrelmail/config.php
DL> I just committed this as-is.
Thanks, below you find a further patch to allow whitespace before the
\n, as you suggested.
Ciao!
Free
=====================================================================
commit b03fd221c55a80075e1d7013818f8c58083eff40
Author: Free Ekanayaka <free at 64studio.com>
Date: Wed Dec 24 09:26:25 2008 +0000
Phpvars: allow whitespaces before the \n in the <?php head line
diff --git a/lenses/phpvars.aug b/lenses/phpvars.aug
index d0ac3d4..998fff5 100644
--- a/lenses/phpvars.aug
+++ b/lenses/phpvars.aug
@@ -17,7 +17,7 @@ let eol = Util.eol
let indent = Util.indent
let empty = Util.empty
-let sep_php = del /<\?php\n/ "<?php\n"
+let sep_php = del /<\?php[ \t]*\n/ "<?php\n"
let sep_eq = del /[ \n]*=/ " ="
let sep_spc = del /[ \n]+/ " "
let sep_dollar = del /\$/ "$"
diff --git a/lenses/tests/test_phpvars.aug b/lenses/tests/test_phpvars.aug
index 91e2497..0cbe0c3 100644
--- a/lenses/tests/test_phpvars.aug
+++ b/lenses/tests/test_phpvars.aug
@@ -1,6 +1,6 @@
module Test_phpvars =
-let conf = "<?php
+let conf = "<?php
/**/
/**
* Multi line comment
=====================================================================
More information about the augeas-devel
mailing list