GNU bug report logs - #55242
[PATCH 01/10] guix: import: Print the number of packages at the end.

Previous Next

Package: guix-patches;

Reported by: Attila Lendvai <attila <at> lendvai.name>

Date: Tue, 3 May 2022 11:22:02 UTC

Severity: normal

Tags: patch

Full log


Message #62 received at 55242 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Attila Lendvai <attila <at> lendvai.name>, 55242 <at> debbugs.gnu.org
Subject: Re: [bug#55242] [PATCH 05/10] guix: import: go: Harden sxml->texi
 conversion.
Date: Tue, 03 May 2022 18:32:58 +0200
[Message part 1 (text/plain, inline)]
Attila Lendvai schreef op di 03-05-2022 om 13:42 [+0200]:
>    (sxml-match sxml-node
> -              ((strong ,text)
> -               (format #f "@strong{~a}" text))
> -              ((a (@ (href ,url)) ,text)
> -               (format #f "@url{~a,~a}" url text))
> -              ((code ,text)
> -               (format #f "@code{~a}" text))
> -              (,something-else something-else)))
> +    ((strong ,text)
> +     (format #f "@strong{~a}" text))

Do we know for sure here that 'text' is actually a string?  What if the
input was (strong (em (a (href "http://super") "Super") emphasis")?

> +    ((a (@ (href ,url)) ,body)
> +     ;; Examples: image in the url: github.com/go-openapi/jsonpointer
> +     ;; (code ...) in the URL body: github.com/mwitkow/go-conntrack
> +     (if (string? body)
> +         (format #f "@url{~a,~a}" url body)
> +         (sxml-match body
> +                     ((code ,text)
> +                      (format #f "@url{~a,~a}" url (sxml->texi body)))
> +                     (,_

I'm not familiar enough with sxml to be sure, but maybe the , can be
removed here.

> +                      (format #f "@url{~a}" url)))))
> +    ((code ,text)
> +     (format #f "@code{~a}" text))
> +    (,something-else
> +     ;; Example: @ in the description: github.com/ethersphere/langos
> +     (if (string? something-else)
> +         (string-replace-substring something-else
> +                                   "@" "@@")
> +         something-else))))

Anyway, more cases are nice, but I recommend tests.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.