On Sat, Oct 27, 2012 at 1:05 AM, David Lutterkort <[email protected]> wrote:

> On Fri, 2012-10-26 at 15:50 +0200, Raphaël Pinson wrote:
> > Hello,
> >
> >
> > I'm trying to use the square lens to manage entries with optional quotes:
> >
> >   let entry =
> >        let quote = del /"?/ "\""
> >     in let body = store /[^\n"]+/
> >     in let sto = square quote body quote
> >     in Build.key_value_line Rx.word Sep.space_equal sto
> >
> >
> > This works with quoted entries, but not with entries that don't have
> > quotes, such as:
> >
> >   key = value
>
> There's a bug in how the ctype for square lenses gets rewritten - it
> doesn't account for the first argument of square accepting the empty
> word, making your quote in effect del /"/ "\""
>
> I've fixed that in commit 51922f9b
>


Great, it works now. Thank you!


-- 
Raphaël Pinson
Administrateur Systèmes & Réseaux
Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to