[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH v3 08/10] builder: add Index.write_entry function



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

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]