Nice catch on right and left delimiters being of type Document.


2013/10/7 Paul Brauner <notifications@github.com>

> In lib/pretty.dart:
>
> > @@ -313,6 +313,47 @@ class _Group extends Document {
> >    }
> >  }
> >
> > +
> > +Document join({ Iterable<dynamic> iterable: const <dynamic>[] }) =>
> > +  iterable.isEmpty
> > +    ? empty
> > +    : (text(',') + line).join(iterable.map(
> > +        (p) => (p is Document) ? p : ( (p is Pretty) ? p.pretty : text(p.toString()) )
> > +    ));
> > +
> > +
> > +Document format({ String name : '', Iterable<dynamic> iterable: const <dynamic>[], int identation: 2,
> > +                String delimiters: '{}', Document emptyValue }) {
>
> I'd rather have leftDelimiter and rightDelimiter than one single
> delimiters argument for which we would need to document that it is expected
> to have two characters only. This would also allow for more than one
> character delimiters. Also since emptyValue is of type document,
> leftDelimiter and rightDelimiter could also be.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/polux/pretty/pull/1/files#r6800673>
> .
>