[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - Sshd: map comments as '#comment' nodes



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=7af39a8f6fe9a6e8f214797183c8dea68a9e5a99
Commit:        7af39a8f6fe9a6e8f214797183c8dea68a9e5a99
Parent:        3fd0299b400281b3317c485553deca466d2087ce
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Wed Mar 4 09:14:31 2009 -0800
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Fri Mar 6 15:06:25 2009 -0800

Sshd: map comments as '#comment' nodes

---
 lenses/sshd.aug |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lenses/sshd.aug b/lenses/sshd.aug
index 8659dfa..6f4204b 100644
--- a/lenses/sshd.aug
+++ b/lenses/sshd.aug
@@ -73,7 +73,8 @@ module Sshd =
    let key_re = /[A-Za-z0-9]+/ 
          - /MACs|Match|AcceptEnv|Subsystem|(Allow|Deny)(Groups|Users)/
 
-   let comment = [ del /(#.*|[ \t]*)\n/ "\n" ]
+   let comment = Util.comment
+   let empty = Util.empty
 
    let array_entry (k:string) =
      let value = store /[^ \t\n]+/ in
@@ -113,14 +114,14 @@ module Sshd =
      [ label "Condition" . condition_entry+ . eol ]
 
    let match_entry = 
-     ( comment | (Util.indent . other_entry) )
+     ( comment | empty | (Util.indent . other_entry) )
 
    let match =
      [ key "Match" . match_cond
         . [ label "Settings" .  match_entry+ ]
      ]
 
-  let lns = (comment | accept_env | allow_groups | allow_users
+  let lns = (comment | empty | accept_env | allow_groups | allow_users
           | deny_groups | subsystem | deny_users | macs 
           | other_entry ) * . match*
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]