[PATCH] Added template filter for converting white spaces to a newline
Mathieu Clabaut
mathieu.clabaut at gmail.com
Fri Oct 10 03:31:21 CDT 2008
On Fri, Oct 10, 2008 at 12:34 AM, Doug Simon <Doug.Simon at sun.com> wrote:
>
> # HG changeset patch
> # User Doug Simon <doug.simon at sun.com<https://mail.google.com/mail?view=cm&tf=0&to=doug.simon@sun.com>
> >
> # Date 1223590072 25200
> # Node ID 51dcd360b16d8eca3f54e147f6ac5c96f2c2091c
> # Parent 643c751e60b248e4672f53633e040929f8041dc0
> Added template filter for converting white spaces to a newline.
>
> This patch adds a 'ws2nl' template filter that converts one or more
> adjacent white spaces characters to a single newline character. This
> makes it possible to apply newline based filters to template keywords
> that generate a list of strings. For example, to show each file modified
> in a changeset, one line per file, the following can be used in a
> template:
>
> \t{files|stringify|ws2nl|tabindent}\n
May be nice... But the proposed example does not cope well with files having
white spaces in their name...
-mathieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20081010/564df3aa/attachment.htm
More information about the Mercurial
mailing list