Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / toml.aug
index 0623653..c1d8ad5 100644 (file)
@@ -5,10 +5,10 @@ Module: Toml
 Author: Raphael Pinson <raphael.pinson@camptocamp.com>
 
 About: Reference
-  https://github.com/mojombo/toml/blob/master/README.md
+  https://toml.io/en/v1.0.0
 
 About: License
-   This file is licenced under the LGPL v2+, like the rest of Augeas.
+   This file is licensed under the LGPL v2+, like the rest of Augeas.
 
 About: Lens Usage
    To be documented
@@ -106,12 +106,14 @@ let norec = str | str_multi | str_literal
           | datetime | date |  time
 
 let array (value:lens) = [ label "array" . lbrack
-               . ( ( Build.opt_list value comma . space_or_empty? . rbrack )
+               . ( ( Build.opt_list value comma . (del /,?/ "") . (space_or_empty | comment)? . rbrack )
                    | rbrack ) ]
 
 let array_norec = array norec
 
-let rec array_rec = array (norec | array_rec)
+(* This is actually no real recursive array, instead it is one or two dimensional
+   For more info on this see https://github.com/hercules-team/augeas/issues/715 *)
+let array_rec = array (norec | array_norec)
 
 let entry_base (value:lens) = [ label "entry" . store Rx.word . Sep.space_equal . value ]
 
@@ -120,7 +122,7 @@ let inline_table (value:lens) = [ label "inline_table" . lbrace
                       | rbrace ) ]
 
 let entry = [ label "entry" . Util.indent . store Rx.word . Sep.space_equal
-            . (norec | array_rec | inline_table norec) . (eol | comment) ]
+            . (norec | array_rec | inline_table (norec|array_norec)) . (eol | comment) ]
 
 (* Group: tables *)