diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-07 20:42:02 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-09-07 20:42:03 +0200 |
commit | 20e3f3e1151b2f22ae7fb5aa8764148654f35090 (patch) | |
tree | 3f6af3a73f4548b8f6564a31984abeeefd60b0ef /guix/import | |
parent | 965e2d6eb90826181471b834437ac68dcb9217cb (diff) | |
parent | 451ba2e5bb523c18a2ccc941df47b598c48ef57e (diff) |
Merge branch 'master' into gnome-team
Diffstat (limited to 'guix/import')
-rw-r--r-- | guix/import/utils.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/import/utils.scm b/guix/import/utils.scm index fcd7707482..0cf52cdbde 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -342,7 +342,14 @@ LENGTH characters." (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])"))) (match (list-matches pattern word) (() word) - (_ (string-append "@code{" word "}"))))))))) + ((m . rest) + ;; Do not include leading or trailing punctuation. + (let* ((last-text (or (and=> (string-skip-right word char-set:punctuation) 1+) + (string-length word))) + (inner (substring word (match:start m) last-text)) + (pre (string-take word (match:start m))) + (post (substring word last-text (string-length word)))) + (string-append pre "@code{" inner "}" post)))))))))) (words (string-tokenize (string-trim-both description) (char-set-complement |