GNU bug report logs - #62202
[PATCH 0/21] Juliahub import script.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 15 Mar 2023 12:49:01 UTC

Severity: normal

Tags: moreinfo, patch

Full log


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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 62202 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 4/4] import: utils: Rule out texinfo common syntax from @
 escape.
Date: Thu, 21 Dec 2023 15:01:03 +0100
---
 guix/import/utils.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 47254539a1..57e4ec0ce7 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -375,7 +375,13 @@ (define* (beautify-description description #:optional (length 80))
                    (cut string-trim-both <> #\')
                    ;; Escape single @ to prevent it from being understood as
                    ;; invalid Texinfo syntax.
-                   (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)
+                   (lambda (word)
+                     (if  ; Rule out some valid Texinfo syntax.
+                      (member word '("@itemize" "@item" "@end" "@quotation"
+                                     "@enumerate" "@code" "@code{"))
+                      word
+                      ((cut regexp-substitute/global
+                            #f "@" <> 'pre "@@" 'post) word)))
                    ;; Wrap camelCase or PascalCase words in @code{...}.
                    (lambda (word)
                      (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])")))
-- 
2.41.0





This bug report was last modified 1 year and 55 days ago.

Previous Next


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