[Libguestfs] [PATCH v3 08/10] builder: add Index.write_entry function
Pino Toscano
ptoscano at redhat.com
Fri Feb 17 14:38:49 UTC 2017
On Friday, 10 February 2017 16:06:03 CET Cédric Bosdonnat wrote:
> Add a function to properly write virt-builder source index entries.
> Note that this function is very similar to Index.print_entry that is
> meant for debugging purposes.
> ---
Mostly LGTM, with just one note:
> + List.iter (
> + fun (lang, notes) ->
> + let format_notes notes =
> + Str.global_replace (Str.regexp "^" ) " " notes in
Won't this kill the newlines in the text of notes? Also, this will add
one empty space at the beginning of the string. One (inefficient)
approach could be:
String.concat "\n " (String.nsplit "\n" notes)
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170217/b5046067/attachment.sig>
More information about the Libguestfs
mailing list