1
0
Fork 1
mirror of https://gitlab.com/Titan-C/org-cv.git synced 2025-04-17 02:39:29 +00:00

feat(ox-moderncv.xl): Better regexp for infinite alphanumeric names

The regexp takes into account multi-part alphanumeric names and even
composed names.
This commit is contained in:
Louis Vigneras 2025-01-05 16:34:51 +01:00
parent 11b764801c
commit b05ca19418

View file

@ -102,7 +102,7 @@ holding export options."
(let ((author (and (plist-get info :with-author)
(let ((auth (plist-get info :author)))
(and auth (org-export-data auth info))))))
(if (string-match "\\([a-z]*.[a-z]*\\).:last.\\([a-z]*.[a-z]*\\)" author)
(if (string-match "\\([a-zA-Z0-9].*\\).:last.\\([a-zA-Z0-9].*\\)" author)
(let ((first-name (match-string 1 author))
(last-name (match-string 2 author)))
(format "\\name{%s}{%s}\n" first-name last-name))