[augeas-devel] [PATCH] Accept empty comment (still requires ticket #4) to be fixed

Raphael Pinson raphink at gmail.com
Fri Aug 29 12:47:21 UTC 2008


# HG changeset patch
# User Raphael Pinson <raphink at gmail.com>
# Date 1220014017 -7200
# Node ID 4b7d32ca0acbed6995bb4635bc49a0af01a715b6
# Parent  2b020796632f86960f88a3c420e0f743426864c9
Accept empty comment (still requires ticket #4) to be fixed
No need to remove /#comment/ from entry_re since it doesn't match

diff -r 2b020796632f -r 4b7d32ca0acb lenses/inifile.aug
--- a/lenses/inifile.aug	Fri Aug 29 14:03:12 2008 +0200
+++ b/lenses/inifile.aug	Fri Aug 29 14:46:57 2008 +0200
@@ -32,7 +32,7 @@ let sto_to_comment     = Util.del_opt_ws
 (* Define comment and defaults *)
 let comment (pat:regexp) (default:string)
                        = [ label "#comment" . sep pat default
-		         . sto_to_eol . eol ]
+		         . sto_to_eol? . eol ]
 let comment_re         = /[;#]/
 let comment_default    = ";"
 
@@ -45,7 +45,7 @@ let comment_default    = ";"
 
 let entry (kw:regexp) (sep:lens) (comment:lens)
                        = [ key kw . sep . sto_to_comment? . (comment|eol) ] | comment
-let entry_re           = ( /[A-Za-z][A-Za-z0-9\._-]+/ - /#comment/ )
+let entry_re           = ( /[A-Za-z][A-Za-z0-9\._-]+/ )
 
 
 (************************************************************************




More information about the augeas-devel mailing list