On Thu, Jun 03, 2010 at 07:00:17PM +0200, Carl Mäsak wrote:
> sorear (>):
> > 2. Indenting a blank line results in a blank line, not a line with only
> >   whitespace.
> What about indenting a line with only whitespace?

Implementor's choice; it won't come up in the viv port.

> I think I can see use cases both for special-casing and for not
> special-casing indenting empty lines. Perhaps that indicates that
> this, too, should be a flag. :indent-empty-lines or something?


> > 3. A variant of indent be provided which does not treat the first character
> >   specially, perhaps named .indent(4 :hang) or .hang.
> I fail to understand what 'does not treat the first character
> specially' means here. Do you have an example?

is("a\nb".indent(1), " a\n b", "indent puts space on the first line");
is("a\nb".hang(1), "a\n b", "hang does not put space on the first line");

hang is useful in formatting applications involving left-to-right composition,
such as "foo: " ~ $text.hang(5)


Attachment: signature.asc
Description: Digital signature

Reply via email to