[augeas-devel] [PATCH 2 of 3] No space around seps by default
Raphael Pinson
raphink at gmail.com
Wed Aug 13 12:18:19 UTC 2008
# HG changeset patch
# User Raphael Pinson <raphink at gmail.com>
# Date 1218629744 -7200
# Node ID 9e0caab46c9bb0a2dbfb9ced71c193cd558a6db2
# Parent b22b3b7537c7992bce8eaea6e69f721763e883a7
No space around seps by default
diff -r b22b3b7537c7 -r 9e0caab46c9b lenses/inifile.aug
--- a/lenses/inifile.aug Wed Aug 13 13:56:55 2008 +0200
+++ b/lenses/inifile.aug Wed Aug 13 14:15:44 2008 +0200
@@ -13,13 +13,13 @@ let eol = Util.eol
let eol = Util.eol
let sep_gen (pat:regexp) (default:string)
- = Util.del_opt_ws " " . del pat default
+ = Util.del_opt_ws "" . del pat default
let value_sep = sep_gen "=" "="
let value_sepwithcolon = sep_gen /[:=]/ "="
-let value_to_eol = Util.del_opt_ws " "
+let value_to_eol = Util.del_opt_ws ""
. store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
-let value_to_comment = Util.del_opt_ws " "
+let value_to_comment = Util.del_opt_ws ""
. store /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
@@ -39,7 +39,7 @@ let empty = Util.empty
* ENTRY
*************************************************************************)
-(* Some implementations of INI file allow ";" as separator *)
+(* Some implementations of INI file allow ":" as separator *)
let entry_generic (kw:regexp) (sep:lens) (comment:lens)
= [ key kw . sep . value_to_comment? . (comment|eol) ]
let entry (kw:regexp)
More information about the augeas-devel
mailing list