# HG changeset patch
# User Raphael Pinson <[EMAIL PROTECTED]>
# Date 1218554849 -7200
# Node ID 283df2b6834bce48edc016f9e4f4a35b55e3155a
# Parent a660016208e0bdc92d274a46d71cab68d887a615
Allow indentation in the beginning of entries
diff -r a660016208e0 -r 283df2b6834b lenses/hosts.aug
--- a/lenses/hosts.aug Tue Aug 12 17:23:21 2008 +0200
+++ b/lenses/hosts.aug Tue Aug 12 17:27:29 2008 +0200
@@ -7,10 +7,12 @@ module Hosts =
let sep_spc = Util.del_ws_spc
let eol = del /[ \t]*\n/ "\n"
+ let indent = del /[ \t]+/ ""
let comment = [ del /(#.*|[ \t]*)\n/ "\n" ]
let word = /[^# \n\t]+/
- let record = [ seq "host" . [ label "ipaddr" . store word ] . sep_tab .
+ let record = [ seq "host" . indent? .
+ [ label "ipaddr" . store word ] . sep_tab .
[ label "canonical" . store word ] .
[ label "alias" . sep_spc . store word ]*
. eol ]
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel